Re: BUG #8870: PL/PgSQL, SELECT .. INTO and the number of result columns

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: marko(at)joh(dot)to, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #8870: PL/PgSQL, SELECT .. INTO and the number of result columns
Date: 2014-01-19 00:08:35
Message-ID: 20140119000835.GB31026@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> ISTM what you're really asking for is a compile time (not run-time) check
> that the number of INTO targets matches the nominal number of output
> columns of the query. Not sure how difficult that is, but it'd be more
> likely to be successful than messing with the run-time behavior in
> exec_move_row.

For my 2c- a compile-time check would be even better than a run-time one
in this case as it would provide pl/pgsql authors notice that they've
goof'd something up. Regardless, I don't see how we can claim to be
respecting what the documentation calls for here and it's causing pain
for our users. I'm on the fence about if we can feel comfortable
back-patching such a change, but I do feel we should figure out a way to
fix it for 9.4.

Thanks,

Stephen

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Marko Tiikkaja 2014-01-19 00:50:01 Re: BUG #8870: PL/PgSQL, SELECT .. INTO and the number of result columns
Previous Message Tom Lane 2014-01-18 23:59:38 Re: BUG #8870: PL/PgSQL, SELECT .. INTO and the number of result columns