Re: FK Constraint sort order with pg_dump

2022-07-21 Thread Tom Lane
Christian Barthel writes: > On Thursday, July 21, 2022, Adrian Klaver wrote: >> Why does it matter? > As the comment in pg_dump.c states, logically identical schemas should > produce identical dumps: Agreed, but this is far from the only deficiency in DOTypeNameCompare. If we're going to try to

Re: FK Constraint sort order with pg_dump

2022-07-21 Thread Adrian Klaver
On 7/21/22 10:59, Christian Barthel wrote: On Thursday, July 21, 2022, Adrian Klaver wrote: Why does it matter? As the comment in pg_dump.c states, logically identical schemas should produce identical dumps: | * We rely on dependency information to help us determine a safe order, | so * the

Re: FK Constraint sort order with pg_dump

2022-07-21 Thread Christian Barthel
On Thursday, July 21, 2022, Adrian Klaver wrote: > On 7/21/22 10:25, Christian Barthel wrote: >> Hello, The sorting order of FK constraints with the same name is >> based on the OID (because it lands in the “Usually shouldn’t get >> here” OID comparison block at [1]). Wouldn’t it be better if the

Re: FK Constraint sort order with pg_dump

2022-07-21 Thread David G. Johnston
On Thu, Jul 21, 2022 at 10:49 AM Adrian Klaver wrote: > On 7/21/22 10:25, Christian Barthel wrote: > > Hello, > > > > The sorting order of FK constraints with the same name is based on the > > OID (because it lands in the “Usually shouldn’t get here” OID comparison > > block at [1]). Wouldn’t it

Re: FK Constraint sort order with pg_dump

2022-07-21 Thread Adrian Klaver
On 7/21/22 10:25, Christian Barthel wrote: Hello, The sorting order of FK constraints with the same name is based on the OID (because it lands in the “Usually shouldn’t get here” OID comparison block at [1]). Wouldn’t it be better if the order of those constraints were based on the table name?