Re: ONLY with parentheses - Mailing list pgsql-hackers

From Tom Lane
Subject Re: ONLY with parentheses
Date
Msg-id 15392.1231425854@sss.pgh.pa.us
Whole thread Raw
In response to Re: ONLY with parentheses  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Peter Eisentraut wrote:
>> Then I noticed that the SQL standard requires parentheses, like
>> 
>> TRUNCATE ONLY (a), b
>> 
>> which is clearer.

> Hmm, if I want to truncate only both (or is that "both only"?), what do
> I have to do?

> TRUNCATE ONLY (a, b)

Yeah.  To me those parentheses look more like redundant parentheses,
eg writing 2 + (2) instead of just 2 + 2.  If you consider that they're
not redundant then it becomes a fair question why Alvaro's multiple-
elements syntax doesn't work.

In the end what you have to point out is that ONLY binds tighter than
comma.  I don't think that parens where the committee put them help
resolve that at all.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: text search patch status update?
Next
From: "Kevin Grittner"
Date:
Subject: Re: incoherent view of serializable transactions