| From: | Robert Haas <robertmhaas(at)gmail(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 13:00:23 |
| Message-ID: | AANLkTikYy+m6pc3=HpY7LXeGBoJ7JjTRgi4Zcu-rumbZ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Aug 19, 2010 at 4:29 AM, Heikki Linnakangas
<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> 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.
Another option would be to make it work as expected.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2010-08-19 13:38:02 | Re: CommitFest 2009-07: Yay, Kevin! Thanks, reviewers! |
| Previous Message | Pavel Stehule | 2010-08-19 10:59:33 | wip: functions median and percentile |