Re: generated constraint name
Peter Eisentraut <peter@eisentraut.org>
From: Peter Eisentraut <peter@eisentraut.org>
To: "David G. Johnston" <david.g.johnston@gmail.com>,
"y.saburov@gmail.com" <y.saburov@gmail.com>,
"pgsql-docs@lists.postgresql.org" <pgsql-docs@lists.postgresql.org>
Date: 2025-04-10T14:11:42Z
Lists: pgsql-docs
On 07.04.25 15:34, David G. Johnston wrote: > On Sunday, April 6, 2025, PG Doc comments form <noreply@postgresql.org > <mailto:noreply@postgresql.org>> wrote: > > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/17/ddl-alter.html <https:// > www.postgresql.org/docs/17/ddl-alter.html> > Description: > > url: > https://www.postgresql.org/docs/current/ddl-alter.html#DDL-ALTER- > REMOVING-A-CONSTRAINT <https://www.postgresql.org/docs/current/ddl- > alter.html#DDL-ALTER-REMOVING-A-CONSTRAINT> > > (If you are dealing with a generated constraint name like $2, don't > forget > that you'll need to double-quote it to make it a valid identifier.) > > If I have a constraint with the name $2, are there other constraints > with > names $1, $3 ... ? > > > 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.
Commits
-
doc: Small example improvement
- 913c60b067aa 18.0 landed
-
Doc: remove long-obsolete advice about generated constraint names.
- deb99dcba7e3 13.21 landed
- 95e83859b94e 14.18 landed
- fc44ae215fcb 15.13 landed
- 047495f1a80d 16.9 landed
- 03faf38a13e5 17.5 landed
- d89335eea67c 18.0 landed