Re: generated constraint name

From: Robert Treat <rob(at)xzilla(dot)net>
To: Euler Taveira <euler(at)eulerto(dot)com>
Cc: Yaroslav Saburov <y(dot)saburov(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter(at)eisentraut(dot)org>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: generated constraint name
Date: 2025-04-24 15:13:24
Message-ID: CABV9wwMXJQ5X8=BmM6sUCzyzefG7eMdyoamVTBVAeiLBnJzABw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Fri, Apr 11, 2025 at 8:45 AM Euler Taveira <euler(at)eulerto(dot)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.

Robert Treat
https://xzilla.net

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Laurenz Albe 2025-04-24 20:04:57 Re: Documentation correction suggestion for primary key hashing on partitioned tables
Previous Message Robert Treat 2025-04-24 14:30:26 Re: Remove unnecessary secondary index terms for replication settings