Re: how control update rows

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Sabin Coanda <s(dot)coanda(at)deuromedia(dot)ro>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: how control update rows
Date: 2011-02-04 07:18:32
Message-ID: AANLkTik2UYrFY7HtwM26uGDrpfHD9Jfoqbmw2XSysnW-@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello

2011/2/3 Sabin Coanda <s(dot)coanda(at)deuromedia(dot)ro>:
> Hi there,
>
> I'd like to control the rows which are updated. I found useful the option
> RETURNING in UPDATE syntaxt. Can I process the rows wich are returning there
> ?
>
> I think to something like that:
>
> SELECT *
> FROM (
>    UPDATE "T" SET
>        "C" = 1
>    WHERE "ID" > 100
>    RETURNING *
> ) x
>

It's not implemented yet. You can use a stored procedure or temp tables instead.

Regards

Pavel Stehule

> TIA,
> Sabin
>
>
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Viktor Bojović 2011-02-04 08:33:21 Re: How to workaround DROP CONSTRAINT [ IF EXISTS ] in Postgres version 8.1?
Previous Message msi77 2011-02-04 07:02:42 Re: UNIQUE on everything except primary key