pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: plpgsql doesn't check a number of expressions and number of target variables correctly
Date: Mon, 05 Mar 2012 14:36:17 -0500
Message-ID: <24904.1330976177@sss.pgh.pa.us> (raw)
In-Reply-To: <CAFj8pRDqYuXZsgxGhXJjVkq4=xA39rZKM_p9_yOuKdjZ+1w3YA@mail.gmail.com>
References: <CAFj8pRDqYuXZsgxGhXJjVkq4=xA39rZKM_p9_yOuKdjZ+1w3YA@mail.gmail.com>

Pavel Stehule <pavel.stehule@gmail.com> writes:
> Hello
> I found a plpgsql bug:

> create or replace function fx()
> returns void as $$
> declare a int; b int;
> begin
>   select 10,20 into a;
> end;
> $$ language plpgsql;

> this is bug, or minimally potential source of strange behave.

AFAICS this is intentional --- see the comment in exec_move_row.

In any case, I think tightening it up is more likely to break working
applications than do anything helpful.

			regards, tom lane



view thread (3+ messages)  latest in thread

Message-ID: <24904.1330976177@sss.pgh.pa.us>
Permalink:  ../24904.1330976177@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/24904.1330976177@sss.pgh.pa.us

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pavel.stehule@gmail.com
  Subject: Re: plpgsql doesn't check a number of expressions and number of target variables correctly
  In-Reply-To: <24904.1330976177@sss.pgh.pa.us>
  References: <CAFj8pRDqYuXZsgxGhXJjVkq4=xA39rZKM_p9_yOuKdjZ+1w3YA@mail.gmail.com> <24904.1330976177@sss.pgh.pa.us>

* 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