Re: PL/pgsSQL EXECUTE USING INTO

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PL/pgsSQL EXECUTE USING INTO
Date: 2010-08-19 15:23:43
Message-ID: 1282231378-sup-2118@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Excerpts from Heikki Linnakangas's message of jue ago 19 04:29:19 -0400 2010:
> While testing the recent issue with unknown params in EXECUTE USING, I
> accidentally did this:
>
> postgres=# DO $$
> DECLARE
> t text;
> BEGIN
> EXECUTE 'SELECT ''foo'' || $1' USING 'bar' INTO t;
> RAISE NOTICE '%', t;
> END;
> $$;
> NOTICE: <NULL>
> DO
>
> The mistake I made? I put the USING and INTO clauses in wrong order,
> INTO needs to go first. We should throw an error on that, but it looks
> like the INTO clause is just silently ignored.

Can't we just accept either order?

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-08-19 15:33:13 Re: wip: functions median and percentile
Previous Message Magnus Hagander 2010-08-19 15:11:01 Re: CommitFest 2009-07: Yay, Kevin! Thanks, reviewers!