pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
how control update rows
2+ messages / 2 participants
[nested] [flat]

* how control update rows
@ 2011-02-03 11:01  Sabin Coanda <s.coanda@deuromedia.ro>
  0 siblings, 1 reply; 2+ messages in thread

From: Sabin Coanda @ 2011-02-03 11:01 UTC (permalink / raw)
  To: pgsql-sql

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

TIA,
Sabin 





^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: how control update rows
@ 2011-02-04 07:18  Pavel Stehule <pavel.stehule@gmail.com>
  parent: Sabin Coanda <s.coanda@deuromedia.ro>
  0 siblings, 0 replies; 2+ messages in thread

From: Pavel Stehule @ 2011-02-04 07:18 UTC (permalink / raw)
  To: Sabin Coanda <s.coanda@deuromedia.ro>; +Cc: pgsql-sql

Hello

2011/2/3 Sabin Coanda <s.coanda@deuromedia.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@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2011-02-04 07:18 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-02-03 11:01 how control update rows Sabin Coanda <s.coanda@deuromedia.ro>
2011-02-04 07:18 ` Pavel Stehule <pavel.stehule@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox