Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 9121FB5DC15 for ; Sat, 17 Sep 2011 11:56:55 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 77587-03 for ; Sat, 17 Sep 2011 14:56:49 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by mail.postgresql.org (Postfix) with SMTP id DD1F6B5DC13 for ; Sat, 17 Sep 2011 11:56:48 -0300 (ADT) Received: (qmail invoked by alias); 17 Sep 2011 14:56:48 -0000 Received: from mue-88-130-44-087.dsl.tropolys.de (EHLO [192.168.1.113]) [88.130.44.87] by mail.gmx.net (mp058) with SMTP; 17 Sep 2011 16:56:48 +0200 X-Authenticated: #14269776 X-Provags-ID: V01U2FsdGVkX18HZVwgz4IHTcLTqqSSZVoFXbtCsfc+xWXgBwIfHe j0doqhGi+9OGp9 Message-ID: <4E74B538.8080902@gmx.net> Date: Sat, 17 Sep 2011 16:56:56 +0200 From: Andreas User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: Use select and update together References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Y-GMX-Trusted: 0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.393 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-0.504, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: X-Archive-Number: 201109/42 X-Sequence-Number: 35842 Am 13.09.2011 07:50, schrieb pasman pasmaƄski: > In 8.4 this syntax is not implemented. select * from ( update tbl set val = 1 where key in ( 1, 2, 3, 4, 5 ) returning * ) as x wouldn't work even in PG 9.1. So what data structure is coming out of an "update ... returning *" statement? It obviously doesn't work like a subquery.