-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:
=?ISO-8859-2?Q?pasman_pasma=F1ski?= 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 commonly used to hide t
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 :
> On 02/09/11, Tom Lane (t...@sss.pgh.pa.us) wrote:
>> Rory Campbell-Lange writes:
>> > I'm doing an UPDATE something l
>
> 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 s
On 02/09/11, Tom Lane (t...@sss.pgh.pa.us) wrote:
> Rory Campbell-Lange 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
Rory Campbell-Lange 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' interpretation
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 doing