Re: generated constraint name
От | Yaroslav Saburov |
---|---|
Тема | Re: generated constraint name |
Дата | |
Msg-id | A76B1033-B4AE-4FE3-AC73-5B5303CF5071@gmail.com обсуждение исходный текст |
Ответ на | Re: generated constraint name (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: generated constraint name
|
Список | pgsql-docs |
Thank you all.
In order not to open a new thread, (small clarification)
On the tutorial-agg page in the code example
SELECT city FROM weather WHERE temp_lo = max(temp_lo); WRONG
you need to add a comment before WRONG
10 квіт. 2025 р. о 18:13 Tom Lane <tgl@sss.pgh.pa.us> пише:
Peter Eisentraut <peter@eisentraut.org> writes:On 07.04.25 15:34, David G. Johnston wrote:I feel like that whole parenthetical should just go away. The point ofthe comment is to remind the user of how identifier values work withrespect to mandatory double quoting. The name itself, other than havinga $, has no special importance.I think generated constraint names were generally "$1", "$2", etc. atsome point, instead of the more readable ones you get today. But thismust 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
В списке pgsql-docs по дате отправления: