From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Christian Barthel <bch(at)online(dot)de> |
Cc: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: FK Constraint sort order with pg_dump |
Date: | 2022-07-21 18:36:19 |
Message-ID: | 2fc24762-8f8f-9126-cee5-f85aa88cf003@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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 initial sort is mostly for cosmetic purposes: we sort by name
> | to * ensure that logically identical schemas will dump identically.
> <https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/bin/pg_dump/pg_dump.c#l883>
>
> This is done for most objects (tables, functions etc). Why not for FK
> constraints?
>
> It makes comparing schemas on different postgres instances simpler
> (i.e. when you’re working with testing, staging, live systems etc).
>
Alright that I can see.
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-07-21 20:46:33 | Re: FK Constraint sort order with pg_dump |
Previous Message | Christian Barthel | 2022-07-21 17:59:42 | Re: FK Constraint sort order with pg_dump |