Re: Partitioned Table Index Column Order

2021-06-23 Thread David Rowley
On Thu, 24 Jun 2021 at 11:56, Tom Lane wrote: > > David Rowley writes: > > On Thu, 24 Jun 2021 at 10:55, Alvaro Herrera > > wrote: > >> It is not relevant from the partitioning point of view. Other factors > >> can be used to decide the column order. > > > I'm not so sure that's really 100% tr

Re: Partitioned Table Index Column Order

2021-06-23 Thread Tom Lane
David Rowley writes: > On Thu, 24 Jun 2021 at 10:55, Alvaro Herrera wrote: >> It is not relevant from the partitioning point of view. Other factors >> can be used to decide the column order. > I'm not so sure that's really 100% true. There is at least one > partitioning feature that will work

Re: Partitioned Table Index Column Order

2021-06-23 Thread David Rowley
On Thu, 24 Jun 2021 at 10:55, Alvaro Herrera wrote: > > On 2021-Jun-23, Rumpi Gravenstein wrote: > > > As a best practice is it better to create the primary key starting or > > ending with the partition column? > > It is not relevant from the partitioning point of view. Other factors > can be use

Re: Partitioned Table Index Column Order

2021-06-23 Thread Tom Lane
Alvaro Herrera writes: > On 2021-Jun-23, Rumpi Gravenstein wrote: >> As a best practice is it better to create the primary key starting or >> ending with the partition column? > It is not relevant from the partitioning point of view. Other factors > can be used to decide the column order. See i

Re: Partitioned Table Index Column Order

2021-06-23 Thread Alvaro Herrera
On 2021-Jun-23, Rumpi Gravenstein wrote: > As a best practice is it better to create the primary key starting or > ending with the partition column? It is not relevant from the partitioning point of view. Other factors can be used to decide the column order. -- Álvaro Herrera Valdivia, C

Re: Partitioned Table conversion to Non-Partition table in postgresql open source

2020-12-28 Thread Hellmuth Vargas
Hi I had already read about some procedures to do that https://www.enterprisedb.com/blog/postgres-partition-upgrade-your-partitioning-inheritance-declarative https://www.2ndquadrant.com/en/blog/how-to-migrate-from-inheritance-based-partitioning-to-declarative-partitioning-in-postgresql/ El lun

Re: [MASSMAIL]Re: partitioned table

2020-01-09 Thread gilberto . castillo
I think you might create a block "Begin-Commit", before procedure call. El 2020-01-09 12:15, Michael Lewis escribió: when I manually mocking the data into both tables are fine and when I run the procedure, I get errorcode: 42P10 MSG: there is no unique or exclusion constraint matching on the CON

Re: partitioned table

2020-01-09 Thread Michael Lewis
> > when I manually mocking the data into both tables are fine and when I run > the procedure, I get errorcode: 42P10 MSG: there is no unique or exclusion > constraint matching on the CONFLICT specification > > the procedure is > ... > INSERT INTO ecisdrdm.bnft_curr_fact AS prod (bnft_fact_id, >