Re: ONLY with parentheses

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ONLY with parentheses
Дата
Msg-id 15392.1231425854@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: ONLY with parentheses  (Alvaro Herrera <alvherre@commandprompt.com>)
Список 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 по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: text search patch status update?
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: incoherent view of serializable transactions