Re: BUG #17662: Error on UPDATE with ()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #17662: Error on UPDATE with ()
Дата
Msg-id 4011529.1666707212@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #17662: Error on UPDATE with ()  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> The bellow command return : ERROR: source for a multiple-column UPDATE item
> must be a sub-SELECT or ROW() expression
> update table set
> (column)=(value)
> where 1=2

The error is telling you what to do.  You should write:

update table set
(column) = ROW(value)
where 1=2

The ROW keyword is optional for a multi-column row, since
(v1,v2) couldn't mean anything else.  But if there's just
one item, the parentheses are noise; they don't turn it
into a row.

            regards, tom lane



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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17662: Error on UPDATE with ()
Следующее
От: Jeff Janes
Дата:
Сообщение: generated columns bug, see inconsistent data