Re: generated constraint name
Peter Eisentraut <peter@eisentraut.org>
From: Peter Eisentraut <peter@eisentraut.org>
To: Robert Treat <rob@xzilla.net>, Euler Taveira <euler@eulerto.com>
Cc: Yaroslav Saburov <y.saburov@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>,
"David G. Johnston" <david.g.johnston@gmail.com>,
pgsql-docs@lists.postgresql.org
Date: 2025-04-29T12:44:10Z
Lists: pgsql-docs
On 24.04.25 17:13, Robert Treat wrote: > On Fri, Apr 11, 2025 at 8:45 AM Euler Taveira <euler@eulerto.com> wrote: >> On Fri, Apr 11, 2025, at 5:32 AM, Yaroslav Saburov wrote: >> 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 >> >> If you consider that that query is correct and it fails in the "wrong" then you >> made the point. >> >> postgres-# select 1; wrong >> ERROR: syntax error at or near "WRONG" >> LINE 1: WRONG >> ^ >> >> However, the query is not correct and it fails before processing the second >> statement (wrong) so it doesn't matter much in this case. Even after saying >> that, I agree with you that this annotation without the comment characters >> don't make much sense. >> >> postgres=# SELECT city FROM weather WHERE temp_lo = max(temp_lo); WRONG >> ERROR: aggregate functions are not allowed in WHERE >> LINE 1: SELECT city FROM weather WHERE temp_lo = max(temp_lo); >> ^ > > While this was a small change, I do think it was an improvement, so > bumping Euler's suggested patch as I think it got lost in the other > discussion. Committed. Thanks for the reminder/review.
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