From: | 小威 <zxw110876189(at)qq(dot)com> |
---|---|
To: | Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: BUG #15237: I got "ERROR: source for a multiple-column UPDATE item must be a sub-SELECT or ROW() expression" |
Date: | 2018-06-14 00:08:58 |
Message-ID: | tencent_BCC0A52F4650CA56252E4E13953E93033807@qq.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
ok,thank your respone.I'll make it back to pg v9 syntax.
---Original---
From: "Andrew Gierth"<andrew(at)tao11(dot)riddles(dot)org(dot)uk>
Date: Tue, Jun 12, 2018 18:28 PM
To: "Tom Lane"<tgl(at)sss(dot)pgh(dot)pa(dot)us>;
Cc: "pgsql-bugs"<pgsql-bugs(at)lists(dot)postgresql(dot)org>;"110876189"<110876189(at)qq(dot)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(at)sss(dot)pgh(dot)pa(dot)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)
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2018-06-14 01:57:53 | Re: BUG #15212: Default values in partition tables don't work as expected and allow NOT NULL violation |
Previous Message | Guilherme - Efige Sistemas | 2018-06-13 19:53:26 | Error |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2018-06-14 00:24:31 | Re: commitfest 2018-07 |
Previous Message | Maksim Milyutin | 2018-06-13 23:04:26 | Re: Slow planning time for simple query |