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

Re: BUG #5274: [PL/PgSQL] EXECUTE ... USING variable expansion

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Vincenzo Romano <vincenzo(dot)romano(at)notorand(dot)it>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5274: [PL/PgSQL] EXECUTE ... USING variable expansion
Date: 2010-01-14 14:59:42
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
> Pavel,
> if it was a simple plain dynami statement, I could create it by string
> concatenation, literal_ and ident_ quoting and so on.

the situation isn't too simply like you see it. PostgreSQL supports
composite and nested types. For this types you cannot use quote*
functions. Next problem is NULL values. I did this work four years ago
it was rejected - from good reasons. You can see more messages from
this time in archive. In plpgsql we don't would to supply SQL parser -
so when you would to identify pleaseholders, then your implementation
will be slow or buggy.

Pavel Stehule

> But this is not my case.
> I'm exploring an alternative approach to the table partitioning
> (
> And being able to handle dynamic DML and DDL is a key point, also for
> the traditional one.
> In practice, the whole EXECUTE...USING command is generated
> dynamically, so not even the names or the values passed after the
> USING lexem are known at that time.
> --
> Vincenzo Romano
> NotOrAnd Information Technologies
> cel. +39 339 8083886  | gtalk. vincenzo(dot)romano(at)notorand(dot)it
> fix. +39 0823 454163  | skype.
> fax. +39 02 700506964 | msn.

In response to

pgsql-bugs by date

Next:From: Justin PittsDate: 2010-01-14 15:07:36
Subject: Re: BUG #5269: postgres backend terminates with SIGSEGV
Previous:From: Pavel StehuleDate: 2010-01-14 14:36:17
Subject: Re: BUG #5274: [PL/PgSQL] EXECUTE ... USING variable expansion

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