Re: generated constraint name - Mailing list pgsql-docs

From Yaroslav Saburov
Subject Re: generated constraint name
Date
Msg-id D6246810-ECE5-4CB5-AD04-C7BD257E18AD@gmail.com
Whole thread Raw
In response to Re: generated constraint name  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-docs

You do not provide the output of the table description, but write that the system generated the name $2


7 квіт. 2025 р. о 16:34 David G. Johnston <david.g.johnston@gmail.com> пише:

On Sunday, April 6, 2025, PG Doc comments form <noreply@postgresql.org> wrote:
The following documentation comment has been logged on the website:

Page: 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

(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.

David J.

pgsql-docs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Possible documentation inaccuracy in optimizer README
Next
From: PG Doc comments form
Date:
Subject: gen_random_uuid random source clarification