From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Petr Jelinek <pjmodos(at)pjmodos(dot)net> |
Subject: | Re: Proposal: USING clause for DO statement |
Date: | 2009-11-21 14:00:31 |
Message-ID: | 162867790911210600p51ff17fh43766e9edcbf340@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2009/11/21 Andrew Dunstan <andrew(at)dunslane(dot)net>:
>
>
> Pavel Stehule wrote:
>>
>> What do you thing about this proposal?
>>
>>
>>
>
> I think it's premature. Before we start adding bells and whistles to the
> feature, let's give it a turn in the field.
why? It thing so not. My opinion - it is incomplete. It has similar
function like function without parameters now. It's good for some
static task (single-use). But it isn't practical for using in shell
scripts. Do you have a other mechanism for parametrisation? I would to
use it from bash - and I need some mechanism for passing an parameter
from command line to DO statement. I
>
> One possible problem: what type would these anonymous params be? (And, BTW,
> don't kid yourself that there would not very soon be pressure to name them).
>
It is solved long time - without specification, any parameter is
'unknown text'. It is based on PQexecParam functionality. In this
case, the situation is simpler - we know value - it same as EXECUTE
statement in plpgsql - type is defined by call. So we knows params (it
is supported by protocol), PL languages support params. So it needs
only some relation. It's need a few lines more in executor (copy a
four pointers and one int) and some in PL (local variable declaring
and copy values) + 5 lines in gram.y
Pavel
p.s. Maybe it is premature - We had to live with EXECUTE (without
USING clause) twelve years. But an life should be comfortable. I don't
would to wait twelve years :)
> cheers
>
> andrew
>
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2009-11-21 15:41:02 | Re: Proposal: USING clause for DO statement |
Previous Message | Andrew Dunstan | 2009-11-21 13:29:10 | Re: Proposal: USING clause for DO statement |