From: | Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: expression evaluation with expected datatypes |
Date: | 2012-07-10 14:44:02 |
Message-ID: | m2sjczekwd.fsf@2ndQuadrant.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
>>> WITH FUNCTION foo(param list) returns rettype language foo AS (
>>> definition here
>>> )
>>> <query using foo() here>;
>>
>> I like this idea. This gets rid of both the "how to pass parameters"
>> and the "how to return results" issues that exist with DO, as well as
>> assorted implementation problems that you hinted at by asking whether
>> DO would still be a utility command.
>
> what is use case for this statement?
It's the DO block idea turned into a query rather than a utility
command: you can now run a function that does not exists in the catalogs
*and* feed it parameters (either from the client, as literals in the
main query, or from the query itself) *and* you get a query result our
of it.
I'm not sure I can understand the difference between that and the use
case for which you want to implement DO blocks with parameters.
Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-07-10 14:44:03 | Re: Re: Allow replacement of bloated primary key indexes without foreign key rebuilds |
Previous Message | Heikki Linnakangas | 2012-07-10 14:40:39 | Re: Synchronous Standalone Master Redoux |