Re: BUG #8870: PL/PgSQL, SELECT .. INTO and the number of result columns - Mailing list pgsql-bugs

From Stephen Frost
Subject Re: BUG #8870: PL/PgSQL, SELECT .. INTO and the number of result columns
Date
Msg-id 20140119000835.GB31026@tamriel.snowman.net
Whole thread Raw
In response to Re: BUG #8870: PL/PgSQL, SELECT .. INTO and the number of result columns  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
* Tom Lane (tgl@sss.pgh.pa.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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #8870: PL/PgSQL, SELECT .. INTO and the number of result columns
Next
From: Marko Tiikkaja
Date:
Subject: Re: BUG #8870: PL/PgSQL, SELECT .. INTO and the number of result columns