From: Pavel Stehule <pavel.stehule@gmail.com>
To: Vincenzo Romano <vincenzo.romano@notorand.it>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #5274: [PL/PgSQL] EXECUTE ... USING variable expansion
Date: Thu, 14 Jan 2010 15:59:42 +0100
Message-ID: <162867791001140659x194aa465q59bb8cbe4b6859b1@mail.gmail.com> (raw)
In-Reply-To: <3eff28921001140650s6ab54e9fna5cfffce53d81ce1@mail.gmail.com>
References: <201001131910.o0DJArAo086208@wwwmaster.postgresql.org>
<162867791001140054w2f383578v7b59b5545310f21f@mail.gmail.com>
<3eff28921001140626v2f5d5957l10853bd3fa37d4e9@mail.gmail.com>
<162867791001140636o4de4927w90a93e631aeef48f@mail.gmail.com>
<3eff28921001140650s6ab54e9fna5cfffce53d81ce1@mail.gmail.com>
> 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
and http://archives.postgresql.org/pgsql-patches/2006-08/msg00271.php
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.
Regards
Pavel Stehule
> But this is not my case.
> I'm exploring an alternative approach to the table partitioning
> (http://notsononsense.blogspot.com/2009/12/postgresql-different-approach-to-table.html).
> 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.romano@notorand.it
> fix. +39 0823 454163 | skype. notorand.it
> fax. +39 02 700506964 | msn. notorand.it
> NON QVIETIS MARIBVS NAVTA PERITVS
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: pavel.stehule@gmail.com, vincenzo.romano@notorand.it
Subject: Re: BUG #5274: [PL/PgSQL] EXECUTE ... USING variable expansion
In-Reply-To: <162867791001140659x194aa465q59bb8cbe4b6859b1@mail.gmail.com>
References: <201001131910.o0DJArAo086208@wwwmaster.postgresql.org> <162867791001140054w2f383578v7b59b5545310f21f@mail.gmail.com> <3eff28921001140626v2f5d5957l10853bd3fa37d4e9@mail.gmail.com> <162867791001140636o4de4927w90a93e631aeef48f@mail.gmail.com> <3eff28921001140650s6ab54e9fna5cfffce53d81ce1@mail.gmail.com> <162867791001140659x194aa465q59bb8cbe4b6859b1@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox