Re: EXECUTE USING for plpgsql (for 8.4)

From: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
To: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
Cc: <pgsql-patches(at)postgresql(dot)org>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Neil Conway" <neilc(at)samurai(dot)com>, "Bruce Momjian" <bruce(at)momjian(dot)us>
Subject: Re: EXECUTE USING for plpgsql (for 8.4)
Date: 2007-10-23 12:22:51
Message-ID: 471DE79B.5080605@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Pavel Stehule wrote:
> Hello
>
> this patch add USING clause into plpgsql EXECUTE statements.
>
> Proposal:
> http://archives.postgresql.org/pgsql-hackers/2007-10/msg00790.php
>
> I found, so dynamics statements are little bit faster with parameters,
> because we don't need call lot of in out/in functions. Mainly it is
> barier to SQL injection.

FWIW, it looks pretty good to me.

This doesn't work:

create function exc_using(varchar) returns varchar
as $$
declare v varchar;
begin
execute 'select upper($1)' into v using ('aa');
return v;
end
$$ language plpgsql;

postgres=# SELECT exc_using('fooa');
ERROR: failed to find conversion function from unknown to text
CONTEXT: SQL statement "select upper($1)"
PL/pgSQL function "exc_using" line 3 at EXECUTE statement

I also noted that the patch makes USING a keyword. Not sure if we care
about that or not.

> I have question, who will be commiter of plpgsql region? I am quite
> irritated from 8.3 process. Bruce's patch queue more or less black
> hole, and I have not any idea, if somebody checking my patches or not
> and if I have to be in readiness or not.
>
> Patch queue is longer and longer, and I need to know any responsible
> person who can be recipient of my reminder request. Really it's
> nothing nice, if your work is repeatedly deleted or inserted to
> current queue. Nobody can do any plans.

All I can say is that I can feel your pain. Let's hope and do our best
to make 8.4 smoother.

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

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Gokulakannan Somasundaram 2007-10-23 12:30:39 Re: [PATCHES] Including Snapshot Info with Indexes
Previous Message Heikki Linnakangas 2007-10-23 12:04:34 Re: [PATCHES] Including Snapshot Info with Indexes