Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e702Y-000169-QY for pgsql-bugs@arkaria.postgresql.org; Tue, 24 Oct 2017 14:18:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e702Y-0003RD-DT for pgsql-bugs@arkaria.postgresql.org; Tue, 24 Oct 2017 14:18:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e702Y-0003Q1-2T for pgsql-bugs@postgresql.org; Tue, 24 Oct 2017 14:18:46 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e702V-0003VW-3G for pgsql-bugs@postgresql.org; Tue, 24 Oct 2017 14:18:45 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v9OEIeEf022435; Tue, 24 Oct 2017 10:18:41 -0400 From: Tom Lane To: YasonTR cc: "pgsql-bugs@postgresql.org" Subject: Re: Possible regression in 'UPDATE ... SET () = ' with just one single column/row value since v10 In-reply-to: References: Comments: In-reply-to YasonTR message dated "Tue, 24 Oct 2017 08:00:43 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <22433.1508854720.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 24 Oct 2017 10:18:40 -0400 Message-ID: <22434.1508854720@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org YasonTR writes: > The following (odd) construction worked in pgv9.x: "UPDATE my_table SET (= my_col) =3D (some value)". This no longer works in v10. It gives the error = "source for a multiple-column UPDATE item must be a sub-SELECT or ROW() exp= ression". It looks like it only breaks when the column list just holds one = single column. Yeah, IIRC this was an intentional change. The fact that the previous coding allowed you to do that was a mistake, because per spec you really need to supply a row value when you parenthesize the SET column list. As of v10 it should work to write UPDATE my_table SET (my_col) =3D ROW(some value) regards, tom lane --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs