pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: Thomas F. O'Connell <tfo@sitening.com>
Cc: mario.splivalo@mobart.hr
Cc: pgsql-sql@postgresql.org
Subject: Re: EXECUTE with SELECT INTO variable, or alternatives
Date: Fri, 30 Sep 2005 17:34:17 -0600
Message-ID: <20050930233417.GA44295@winnie.fuhr.org> (raw)
In-Reply-To: <1045972B-4D8E-4801-A958-76A1DB6FAD0B@sitening.com>
References: <1128017805.9061.5.camel@localhost.localdomain>
	<1045972B-4D8E-4801-A958-76A1DB6FAD0B@sitening.com>

On Fri, Sep 30, 2005 at 03:59:06PM -0500, Thomas F. O'Connell wrote:
> Per the docs:
> 
> "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."

8.1 will have EXECUTE ... INTO.

http://developer.postgresql.org/docs/postgres/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-D...

-- 
Michael Fuhr



view thread (3+ messages)

Message-ID: <20050930233417.GA44295@winnie.fuhr.org>
Permalink:  ../20050930233417.GA44295@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20050930233417.GA44295@winnie.fuhr.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mike@fuhr.org, tfo@sitening.com, mario.splivalo@mobart.hr
  Subject: Re: EXECUTE with SELECT INTO variable, or alternatives
  In-Reply-To: <20050930233417.GA44295@winnie.fuhr.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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