Adam Brusselback 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 col
Appreciate the link, didn't come up when I was googling the issue.
As you said, a mention in the release notes would have been helpful.
Thanks,
-Adam
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/p
On Mon, Oct 30, 2017 at 12:29:03PM -0400, Adam Brusselback wrote:
> I have some queries that were working in 9.6 which suddenly broke when
> moving to 10.
>
> Digging in, the error i'm getting is: ERROR: source for a
> multiple-column UPDATE item must be a sub-SELECT or ROW() expression
> So the
Hey all, just getting around to updating my development environment to
Postgres 10, and there was something I found while in testing.
Version info: PostgreSQL 10.0 on x86_64-pc-linux-gnu, compiled by gcc
(Debian 6.3.0-18) 6.3.0 20170516, 64-bit
I have some queries that were working in 9.6 which s
>David Greco wrote:
>[wants to use CTEs in an UPDATE]
>> Yeah that's good, but there are plenty of columns, was hoping to be
able to use (table.*) syntax
>Is this a problem or do you just want to type as little as possible?
>You have to specify them in the SET clause anyway.
No problem, just l
David Greco wrote:
[wants to use CTEs in an UPDATE]
> Yeah that's good, but there are plenty of columns, was hoping to be
able to use (table.*) syntax
Is this a problem or do you just want to type
as little as possible?
You have to specify them in the SET clause anyway.
Yours,
Laurenz Albe
--
Yeah that's good, but there are plenty of columns, was hoping to be able to use
(table.*) syntax
-Original Message-
From: Albe Laurenz [mailto:laurenz.a...@wien.gv.at]
Sent: Friday, November 30, 2012 3:47 AM
To: David Greco; pgsql-general@postgresql.org
Subject: RE: [GENERAL] U
David Greco wrote:
> Need some help with UPDATE syntax. I am attempting to do something
like this:
>
> WITH default_facility AS (
> SELECT facility_id,
> inkjetorlabel
> FROM engagement_facility_defs
> WHERE engagement_facility_def_id
Need some help with UPDATE syntax. I am attempting to do something like this:
WITH default_facility AS (
SELECT facility_id,
inkjetorlabel
FROM engagement_facility_defs
WHERE engagement_facility_def_id = 8
)
UPDATE engagement_faciliti
On Tue, 12 Jun 2012, David Johnston wrote:
And, to be thorough, you need to put commas between each field you want to
update.
Did that. Didn't write it that way in the message.
Regards,
Rich
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your sub
On Jun 12, 2012, at 18:50, Rich Shepard wrote:
> On Wed, 13 Jun 2012, Thomas Kellerer wrote:
>
>> UPDATE waterchem
>> SET waterchem.easting = s.easting
>> waterchem.northing = s.northing
>> FROM sites AS s
>> WHERE waterchem.site = s.name;
>
> Thomas,
>
> For the record, running this push
On Wed, 13 Jun 2012, Thomas Kellerer wrote:
UPDATE waterchem
SET waterchem.easting = s.easting
waterchem.northing = s.northing
FROM sites AS s
WHERE waterchem.site = s.name;
Thomas,
For the record, running this pushed me to the correct syntax:
UPDATE waterchem
SET easting = s.e
On Wed, 13 Jun 2012, Thomas Kellerer wrote:
No it's not quite correct:
UPDATE waterchem
SET waterchem.easting = s.easting
waterchem.northing = s.northing
FROM sites AS s
WHERE waterchem.site = s.name;
Thomas,
I wondered about this syntax, and doing each column separately.
Thanks for
Rich Shepard wrote on 13.06.2012 00:17:
One table, waterchem, with primary key 'site' has columns easting and
northing with no values in them. A second table, sites, with primary key
'name' has values for easting and northing for each row. I want to update
waterchem with the easting and northi
One table, waterchem, with primary key 'site' has columns easting and
northing with no values in them. A second table, sites, with primary key
'name' has values for easting and northing for each row. I want to update
waterchem with the easting and northing values from sites. My proposed
statemen
15 matches
Mail list logo