PL/pgsSQL EXECUTE USING INTO

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: PL/pgsSQL EXECUTE USING INTO
Date: 2010-08-19 08:29:19
Message-ID: 4C6CEB5F.4050004@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2010-08-19 09:35:04 Re: git: uh-oh
Previous Message Heikki Linnakangas 2010-08-19 08:22:36 Re: [COMMITTERS] pgsql: Coerce 'unknown' type parameters to the right type in the