Re: BUG #15237: I got "ERROR: source for a multiple-column UPDATE item must be a sub-SELECT or ROW() expression" - Mailing list pgsql-bugs

From 小威
Subject Re: BUG #15237: I got "ERROR: source for a multiple-column UPDATE item must be a sub-SELECT or ROW() expression"
Date
Msg-id tencent_BCC0A52F4650CA56252E4E13953E93033807@qq.com
Whole thread Raw
In response to BUG #15237: I got "ERROR: source for a multiple-column UPDATE itemmust be a sub-SELECT or ROW() expression"  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
ok,thank your respone.I'll make it back to pg v9 syntax.

---Original---
From: "Andrew Gierth"<andrew@tao11.riddles.org.uk>
Date: Tue, Jun 12, 2018 18:28 PM
To: "Tom Lane"<tgl@sss.pgh.pa.us>;
Cc: "pgsql-bugs"<pgsql-bugs@lists.postgresql.org>;"110876189"<110876189@qq.com>;
Subject: Re: BUG #15237: I got "ERROR: source for a multiple-column UPDATE item must be a sub-SELECT or ROW() expression"

>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:

 >> On PostgreSQL 11 Beta, I exec sql like "update
 >> fvt_obj_operate_update_table_033 set (c_int) = (20) where c_int = 20;",
 >> which only on column to set, got ""ERROR:  source for a multiple-column
 >> UPDATE item must be a sub-SELECT or ROW() expression"".

 Tom> It's telling you what to do: use a ROW() expression, ie

 Tom> update fvt_obj_operate_update_table_033 set (c_int) = row(20)
 Tom>   where c_int = 20;

Yeah, but (a) this used to work, and has worked since at least as far
back as 9.0, and (b) the spec requires it to work.

--
Andrew (irc:RhodiumToad)

pgsql-bugs by date:

Previous
From: Guilherme - Efige Sistemas
Date:
Subject: Error
Next
From: Michael Paquier
Date:
Subject: Re: BUG #15212: Default values in partition tables don't work asexpected and allow NOT NULL violation