From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
Cc: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "y(dot)saburov(at)gmail(dot)com" <y(dot)saburov(at)gmail(dot)com>, "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: generated constraint name |
Date: | 2025-04-10 15:13:00 |
Message-ID: | 520881.1744297980@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
Peter Eisentraut <peter(at)eisentraut(dot)org> writes:
> On 07.04.25 15:34, David G. Johnston wrote:
>> I feel like that whole parenthetical should just go away. The point of
>> the comment is to remind the user of how identifier values work with
>> respect to mandatory double quoting. The name itself, other than having
>> a $, has no special importance.
> I think generated constraint names were generally "$1", "$2", etc. at
> some point, instead of the more readable ones you get today. But this
> must be ancient.
Good point. A bit of git-blame'ing shows that this documentation
wording appeared in e560dd353 of 2003-11-05, but we changed the
generation rule to not be "$n" in 45616f5bb of 2004-06-10.
(Oddly, I moved this documentation text around in 2005 without
noticing it was obsolete; or perhaps I did realize that but figured
it was still applicable to versions in the field.)
I concur with David that we should just drop the para. It's merely
confusing now. If you have a generated constraint name, it won't
require double-quoting unless your table or column name does, and
if they do you are doubtless already quite familiar with how
quoting works.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Yaroslav Saburov | 2025-04-11 08:32:45 | Re: generated constraint name |
Previous Message | Peter Eisentraut | 2025-04-10 14:11:42 | Re: generated constraint name |