Re: FK Constraint sort order with pg_dump

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: Christian Barthel <bch(at)online(dot)de>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: FK Constraint sort order with pg_dump
Date: 2022-07-21 17:54:50
Message-ID: CAKFQuwbGEwwxRK4eCvv=2e=G0_wO77s3AnHny4yt1JfqsHg_2w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jul 21, 2022 at 10:49 AM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
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 order of those constraints
> > were based on the table name?
> >
>
> Why does it matter?
>
>
As the code comment says:

/* To have a stable sort order, break ties for some object types */

This seems like it is simply a missed case.

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Christian Barthel 2022-07-21 17:59:42 Re: FK Constraint sort order with pg_dump
Previous Message Adrian Klaver 2022-07-21 17:49:33 Re: FK Constraint sort order with pg_dump