Re: generated constraint name - Mailing list pgsql-docs

From Peter Eisentraut
Subject Re: generated constraint name
Date
Msg-id 2a793c4f-7e50-4188-883d-bad4874ba0cd@eisentraut.org
Whole thread Raw
In response to Re: generated constraint name  (Robert Treat <rob@xzilla.net>)
List 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.




pgsql-docs by date:

Previous
From: Tom Lane
Date:
Subject: Re: `inet` docs suggestion and possible bug report
Next
From: Tom Lane
Date:
Subject: Re: `inet` docs suggestion and possible bug report