Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 370871337B69 for ; Thu, 3 Feb 2011 07:26:23 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 92456-07 for ; Thu, 3 Feb 2011 11:26:16 +0000 (UTC) Received: from news.hub.org (news.hub.org [200.46.204.72]) by mail.postgresql.org (Postfix) with ESMTP id F114F1337B68 for ; Thu, 3 Feb 2011 07:26:15 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.4/8.14.4) with ESMTP id p13BQFpN017624 for ; Thu, 3 Feb 2011 07:26:15 -0400 (AST) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.14.4/8.14.4/Submit) id p13B3fxe062617 for pgsql-sql@postgresql.org; Thu, 3 Feb 2011 07:03:41 -0400 (AST) (envelope-from news) From: "Sabin Coanda" X-Newsgroups: pgsql.sql Subject: how control update rows Date: Thu, 3 Feb 2011 13:01:21 +0200 Organization: Hub.Org Networking Services Lines: 20 Message-ID: X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 X-RFC2646: Format=Flowed; Original To: pgsql-sql@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.79 tagged_above=-5 required=5 tests=BAYES_50=0.8, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201102/13 X-Sequence-Number: 35089 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