Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Pavel Stehule wrote:
> Hello
> this patch add USING clause into plpgsql EXECUTE statements.
> Proposal:
> 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;
  execute 'select upper($1)' into v using ('aa');
  return v;
$$ 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

In response to


pgsql-patches by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group