UPDATE using query; per-row function calling problem - Mailing list pgsql-general

From Rory Campbell-Lange
Subject UPDATE using query; per-row function calling problem
Date
Msg-id 20110901220903.GA22775@campbell-lange.net
Whole thread Raw
Responses Re: UPDATE using query; per-row function calling problem
List pgsql-general
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 a
PL loop?

Regards
Rory

pgsql-general by date:

Previous
From: Raghavendra
Date:
Subject: Re: pgfoundry.org is not accessible
Next
From: Scott Marlowe
Date:
Subject: Re: How to get around this limitation (ALTER DATABASE db SET search_path = ...)