Re: PL/pgsSQL EXECUTE USING INTO - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: PL/pgsSQL EXECUTE USING INTO
Date
Msg-id 1282231378-sup-2118@alvh.no-ip.org
Whole thread Raw
In response to PL/pgsSQL EXECUTE USING INTO  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List 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@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: CommitFest 2009-07: Yay, Kevin! Thanks, reviewers!
Next
From: darklow
Date:
Subject: FTS wildcard and custom ispell dictionary problem