Re: [GENERAL] UPDATE syntax change

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [GENERAL] UPDATE syntax change
Дата
Msg-id 17451.1509381766@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [GENERAL] UPDATE syntax change  (Adam Brusselback <adambrusselback@gmail.com>)
Список pgsql-general
Adam Brusselback <adambrusselback@gmail.com> writes:
> --works
> UPDATE tst_table
> SET (b, c) = ('help me', 'please')
> WHERE a = 0;
> --does not work
> UPDATE tst_table
> SET (b) = ('help me')
> WHERE a = 0;

> So there was a change made, and you now cannot use the multi-column
> syntax if you're only updating a single column.  Was this intentional?

You still can, but you have to write ROW() explicitly.  This conforms
to the standard, which our old behavior didn't.

It was probably an oversight not to list this change as a compatibility
issue.  I'll go fix that ...
        regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

В списке pgsql-general по дате отправления:

Предыдущее
От: Adam Brusselback
Дата:
Сообщение: Re: [GENERAL] UPDATE syntax change (column-list UPDATE syntax failswith single column)
Следующее
От: Rob Sargent
Дата:
Сообщение: Re: [GENERAL] gin index trouble