X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id BA58552C5D for ; Fri, 15 Jul 2005 16:26:44 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 20494-09 for ; Fri, 15 Jul 2005 19:26:40 +0000 (GMT) Received: from a2s1.a2webhosting.com (host-180.a2webhosting.com [69.39.89.180]) by svr1.postgresql.org (Postfix) with ESMTP id 6B98B52C16 for ; Fri, 15 Jul 2005 16:26:39 -0300 (ADT) Received: from user-11204q7.dsl.mindspring.com ([66.32.19.71] helo=[192.168.1.10]) by a2s1.a2webhosting.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.50) id 1DtVpY-0001PL-5c; Fri, 15 Jul 2005 15:26:40 -0400 In-Reply-To: <20050714074554.4E4EC52D55@svr1.postgresql.org> References: <20050714074554.4E4EC52D55@svr1.postgresql.org> Mime-Version: 1.0 (Apple Message framework v730) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <5C174834-4EDD-46C2-9C73-A02B3D148545@pgedit.com> Cc: Content-Transfer-Encoding: 7bit From: John DeSoi Subject: Re: Error on dynamic code. Date: Fri, 15 Jul 2005 15:26:35 -0400 To: Mark J Camilleri X-Mailer: Apple Mail (2.730) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - a2s1.a2webhosting.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - pgedit.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.013 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/147 X-Sequence-Number: 22125 On Jul 14, 2005, at 3:46 AM, Mark J Camilleri wrote: > > > The funny thing is that the documentation I read about SELECT INTO > and RECORD types give the following example, amongst others: See the section below that on EXECUTE: > The results from SELECT commands are discarded by EXECUTE, and > SELECT INTO is not currently supported within EXECUTE. So there is > no way to extract a result from a dynamically-created SELECT using > the plain EXECUTE command. There are two other ways to do it, > however: one is to use the FOR-IN-EXECUTE loop form described in > Section 35.7.4, and the other is to use a cursor with OPEN-FOR- > EXECUTE, as described in Section 35.8.2. John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL