pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@kurilemu.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Kirill Reshke <reshkekirill@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Command order bug in pg_dump
Date: Tue, 22 Apr 2025 21:08:07 +0200
Message-ID: <202504221908.4py5zqgmm422@alvherre.pgsql> (raw)
In-Reply-To: <836817.1745264514@sss.pgh.pa.us>

On 2025-Apr-21, Tom Lane wrote:

> I experimented with the attached, which approximates "add some digits
> to the name used for the parent constraint".  (We could refactor
> ChooseConstraintName if we wanted a less approximate version of that
> rule, but I'm not sure it's worth the trouble.)

This seems a better implementation of the idea than what I had in mind.
For my part, please feel free to go ahead with this.  (I can focus on
the remaining problems with self-referencing FKs ... sigh)

> The extent to which these derived names leak out to the user, as
> illustrated by the regression test changes, makes me even less happy
> about the fact that \d doesn't show them.  I think we really ought
> to try to find a way to not need these entries.  But that is clearly
> not v18 material at this point.

Well, for starters we could change psql to show the hidden constraint
names.  Since this appears to be a problem for users, maybe even change
\d+ to show them in backbranches.  For the longer term (19) I can try to
work on reimplementing things so that these names don't appear anywhere
and are more collision-resistant (though frankly I would prefer to spend
my time on REPACK and column reordering)

> > I'd probably not change this in versions 13 and 14 at all in any case,
> > because the code is too different.  I'm unsure whether this is enough of
> > a bug to consider backpatching to 15-17; maybe we should just change 18
> > at this point, since I haven't heard of a user complaining about this.
> 
> Kirill's complaint isn't that?

I didn't see it as one as first, but I reread his OP and now I agree
that it is.


FWIW I've been migrating my main email address to a new domain.  Finally
got sick of noip.com.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"La vida es para el que se aventura"





view thread (13+ messages)  latest in thread

Message-ID: <202504221908.4py5zqgmm422@alvherre.pgsql>
Permalink:  ../202504221908.4py5zqgmm422@alvherre.pgsql/
Also on:    postgresql.org/message-id/202504221908.4py5zqgmm422@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: alvherre@kurilemu.de, tgl@sss.pgh.pa.us, reshkekirill@gmail.com
  Subject: Re: Command order bug in pg_dump
  In-Reply-To: <202504221908.4py5zqgmm422@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox