From: Adrian Klaver <aklaver@comcast.net>
To: pgsql-sql@postgresql.org
Cc: Andreas Kretschmer <akretschmer@spamfence.net>
Subject: Re: select into
Date: Fri, 24 Nov 2006 07:26:05 -0800
Message-ID: <200611240726.05395.aklaver@comcast.net> (raw)
In-Reply-To: <20061124145519.GA5805@KanotixBox>
References: <20061124042134.55885.qmail@web90512.mail.mud.yahoo.com>
<200611240645.33431.aklaver@comcast.net>
<20061124145519.GA5805@KanotixBox>
On Friday 24 November 2006 06:55 am, Andreas Kretschmer wrote:
> 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#PL
> >PGSQL-STATEMENTS-EXECUTING-DYN " 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
Thanks for the information. Somewhere along the line I missed the distinction.
--
Adrian Klaver
aklaver@comcast.net
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: aklaver@comcast.net, akretschmer@spamfence.net
Subject: Re: select into
In-Reply-To: <200611240726.05395.aklaver@comcast.net>
* 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