-Original Message-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Rory Campbell-Lange
Sent: Monday, September 05, 2011 4:55 PM
To: David Johnston
Cc: Tom Lane; pgsql-general@postgresql.org
Subject: Re: [GENERAL] UPDATE using query; per-row
On 02/09/11, David Johnston (pol...@yahoo.com) wrote:
In my -1 example, am I right in assuming that I created a correlated
subquery rather than an correlated one? I'm confused about the
difference.
Correlated: has a where clause that references the outer query
Un-correlated: not
On 02/09/11, Tom Lane (t...@sss.pgh.pa.us) wrote:
Rory Campbell-Lange r...@campbell-lange.net writes:
I'm doing an UPDATE something like this:
UPDATE
slots
SET
a = 'a'
,b = (SELECT uuid_generate_v1())
WHERE
c = TRUE;
Each updated row
In my -1 example, am I right in assuming that I created a correlated
subquery rather than an correlated one? I'm confused about the
difference.
Correlated: has a where clause that references the outer query
Un-correlated: not correlated
Because of the where clause a correlated
That's interpretation of subselect is ok, when it contains only stable
functions.
Maybe add a warning when subselect contains volatile function.
2011/9/2, Rory Campbell-Lange r...@campbell-lange.net:
On 02/09/11, Tom Lane (t...@sss.pgh.pa.us) wrote:
Rory Campbell-Lange r...@campbell-lange.net
=?ISO-8859-2?Q?pasman_pasma=F1ski?= pasma...@gmail.com writes:
That's interpretation of subselect is ok, when it contains only stable
functions.
Maybe add a warning when subselect contains volatile function.
We're not likely to do that, because this sort of notation is actually
fairly
I'm doing an UPDATE something like this:
UPDATE
slots
SET
a = 'a'
,b = (SELECT uuid_generate_v1())
WHERE
c = TRUE;
Each updated row in slots is getting the same value for b. Is there a
way of getting a per-row value from uuid_generate_v1() without
Rory Campbell-Lange r...@campbell-lange.net writes:
I'm doing an UPDATE something like this:
UPDATE
slots
SET
a = 'a'
,b = (SELECT uuid_generate_v1())
WHERE
c = TRUE;
Each updated row in slots is getting the same value for b.
That's Postgres'