Re: BUG #4633: Bug in PL/PgSQL "SELECT .. INTO" statement parser

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Oleg" <serovOv(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4633: Bug in PL/PgSQL "SELECT .. INTO" statement parser
Date: 2009-01-27 21:45:53
Message-ID: 1285.1233092753@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Oleg" <serovOv(at)gmail(dot)com> writes:
> DECLARE
> row_test1 test1%rowtype;
> row_test2 test2%rowtype;
> BEGIN
> SELECT test1, test2
> FROM test1 JOIN test2 ON(chunk.id = test2.chunk_id)
> LIMIT 1
> INTO row_test1, row_test2;

Can't do that. The INTO target can be either a row variable or a list
of scalar variables ... not a list of row variables.

You could probably make it work by just making the target be a "record"
variable that'd wind up containing two composite fields.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Marshall, Steve 2009-01-27 22:46:33 Re: pg_listener entries deleted under heavy NOTIFY load only on Windows
Previous Message Oleg 2009-01-27 21:15:33 BUG #4633: Bug in PL/PgSQL "SELECT .. INTO" statement parser