Re: select into

From: Adrian Klaver <aklaver(at)comcast(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Cc: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
Subject: Re: select into
Date: 2006-11-24 15:26:05
Message-ID: 200611240726.05395.aklaver@comcast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Friday 24 November 2006 06:55 am, Andreas Kretschmer wrote:
> Adrian Klaver <aklaver(at)comcast(dot)net> schrieb:
> > On Thursday 23 November 2006 08:45 pm, Tom Lane wrote:
> > > Mulham freshcode <mulhamcode(at)yahoo(dot)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(at)comcast(dot)net

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Adrian Klaver 2006-11-24 15:30:33 Re: select into
Previous Message Andreas Kretschmer 2006-11-24 14:55:19 Re: select into