Hi Hackers,
Commit 906bfcad7ba7c has improved handling for "UPDATE ... SET (column_list) = row_constructor", but it has broken in some cases where it was working prior to this commit.
After this commit query “DO UPDATE SET (t1_col)” is giving an error which was working fine earlier.
commit 906bfcad7ba7cb3863fe0e2a7810be8e3cd84fbd
Author: Tom Lane <
tgl@sss.pgh.pa.us>
Date: Tue Nov 22 15:19:57 2016 -0500
Improve handling of "UPDATE ... SET (column_list) = row_constructor".
Previously, the right-hand side of a multiple-column assignment, if it
Test case:
CREATE TABLE t1 (id1 int NOT NULL primary key, t1_col text NOT NULL);
INSERT INTO t1(id1, t1_col) VALUES (88,'test1') ON CONFLICT ( id1 )
DO UPDATE SET (t1_col) = ('test2');
ERROR: source for a multiple-column UPDATE item must be a sub-SELECT or ROW() expressionLINE 1: ...') ON CONFLICT ( id1 )DO UPDATE SET (t1_col) = ('test2'); ^
I am getting above error from v10 to master but it is passing in v96 and v95.
If we change "SET (t1_col)" to "SET t1_col", then the above test case is passing in all the branches.
This looks like a bug.
Thoughts?
Thanks and Regards
Mahendra Singh Thalor
EnterpriseDB:
http://www.enterprisedb.com