From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: expression evaluation with expected datatypes |
Date: | 2012-07-08 16:25:07 |
Message-ID: | CAFj8pRCxr-_-xD7BR0Cn+LM-63P1fV_xJE4DuWLZkW4O2fk2Tw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2012/7/8 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
>> When I worked on parametrised DO statement, I had to solve following issue:
>
>> Syntax is:
>
>> DO (param list) $$ ... $$ LANGUAGE ... USING expr_list
>
>> What is correct way for evaluation of expr_list with specified target types?
>
> I'd argue that that's a pointlessly unwieldy syntax that's creating an
> unnecessary problem. Just use a SELECT list, that is
>
> DO ... USING value AS name, value2 AS name2, ...
>
> The value expressions can define their own types just fine.
it is solution, but it is consistent with nothing what we support
* it is different than USING clause in other statements or in dynamic
SQL in plpgsql
* it is different than named parameter syntax
and I don't think so plpgsql style in main core is ok - when parser
returns some tree, but we use substring of queryString instead.
Regards
Pavel
>
> regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2012-07-08 19:27:30 | Re: Schema version management |
Previous Message | Tom Lane | 2012-07-08 16:00:23 | Re: expression evaluation with expected datatypes |