Re: [GENERAL] UPDATE syntax change - Mailing list pgsql-general

From Tom Lane
Subject Re: [GENERAL] UPDATE syntax change
Date
Msg-id 17451.1509381766@sss.pgh.pa.us
Whole thread Raw
In response to [GENERAL] UPDATE syntax change  (Adam Brusselback <adambrusselback@gmail.com>)
List pgsql-general
Adam Brusselback <adambrusselback@gmail.com> writes:
> --works
> UPDATE tst_table
> SET (b, c) = ('help me', 'please')
> WHERE a = 0;
> --does not work
> UPDATE tst_table
> SET (b) = ('help me')
> WHERE a = 0;

> So there was a change made, and you now cannot use the multi-column
> syntax if you're only updating a single column.  Was this intentional?

You still can, but you have to write ROW() explicitly.  This conforms
to the standard, which our old behavior didn't.

It was probably an oversight not to list this change as a compatibility
issue.  I'll go fix that ...
        regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

pgsql-general by date:

Previous
From: Adam Brusselback
Date:
Subject: Re: [GENERAL] UPDATE syntax change (column-list UPDATE syntax failswith single column)
Next
From: Rob Sargent
Date:
Subject: Re: [GENERAL] gin index trouble