pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas Kretschmer <akretschmer@spamfence.net>
To: pgsql-sql@postgresql.org
Subject: Re: select into
Date: Fri, 24 Nov 2006 15:55:19 +0100
Message-ID: <20061124145519.GA5805@KanotixBox> (raw)
In-Reply-To: <200611240645.33431.aklaver@comcast.net>
References: <20061124042134.55885.qmail@web90512.mail.mud.yahoo.com>
	<28318.1164343519@sss.pgh.pa.us>
	<200611240645.33431.aklaver@comcast.net>

Adrian Klaver <aklaver@comcast.net> schrieb:

> On Thursday 23 November 2006 08:45 pm, Tom Lane wrote:
> > Mulham freshcode <mulhamcode@yahoo.com> writes:
> > > execute sql_str1 into svc_data_rec ;
> > >
> > > svc_data_rec is a RECORD, which is supposed to be dynamic.
> >
> > This should work --- in PG 8.1 or later.  In older versions you'd have
> > to fool around with a FOR ... IN EXECUTE ... loop.
> >
> > 			regards, tom lane
> The documentation for pl/pgsql  in 8.1 and higher says different. 
> 
> http://www.postgresql.org/docs/8.1/interactive/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-...
> " SELECT INTO is not currently supported within EXECUTE."

Thats right. The solution with 8.1 or later is:

EXECUTE .... INTO var, and _not_ SELECT INTO var.


Andreas
-- 
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."    (unknow)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°



view thread (43+ messages)  latest in thread

Message-ID: <20061124145519.GA5805@KanotixBox>
Permalink:  ../20061124145519.GA5805@KanotixBox/
Also on:    postgresql.org/message-id/20061124145519.GA5805@KanotixBox

 · 

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: akretschmer@spamfence.net
  Subject: Re: select into
  In-Reply-To: <20061124145519.GA5805@KanotixBox>

* 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