public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: Re: SELECT List with/without parentheses
Date: Fri, 05 Sep 2025 17:17:02 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
PG Doc comments form <[email protected]> writes:
> There is no mention of the difference in PostgreSql behavior if the select
> list of columns is surrounded by parentheses or not.
What you've written there is an implicit row constructor, that is
"(a,b,...)" is taken as "ROW(a,b,...)". These are documented at [1],
but it would be quite unwieldy to point out the possibility of this
for every context in which it could be written.
Personally I think implicit row constructors were one of the SQL
committee's worst ideas, precisely because of the surprise factor.
But it's in the standard so we're stuck with it.
regards, tom lane
[1] https://www.postgresql.org/docs/current/sql-expressions.html#SQL-SYNTAX-ROW-CONSTRUCTORS
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: SELECT List with/without parentheses
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox