pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: 110876189@qq.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15237: I got "ERROR: source for a multiple-column UPDATE item must be a sub-SELECT or ROW() expression"
Date: Tue, 12 Jun 2018 11:28:38 +0100
Message-ID: <87r2lctidw.fsf@news-spur.riddles.org.uk> (raw)
In-Reply-To: <22079.1528774703@sss.pgh.pa.us>
References: <152876885706.32361.1270737678956483321@wrigleys.postgresql.org>
	<22079.1528774703@sss.pgh.pa.us>

>>>>> "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)




view thread (12+ messages)  latest in thread

Message-ID: <87r2lctidw.fsf@news-spur.riddles.org.uk>
Permalink:  ../87r2lctidw.fsf@news-spur.riddles.org.uk/
Also on:    postgresql.org/message-id/87r2lctidw.fsf@news-spur.riddles.org.uk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: andrew@tao11.riddles.org.uk, tgl@sss.pgh.pa.us, 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"
  In-Reply-To: <87r2lctidw.fsf@news-spur.riddles.org.uk>
  References: <152876885706.32361.1270737678956483321@wrigleys.postgresql.org> <22079.1528774703@sss.pgh.pa.us> <87r2lctidw.fsf@news-spur.riddles.org.uk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox