Re: allow select from void function in void sql function - Mailing list pgsql-patches

From David Fetter
Subject Re: allow select from void function in void sql function
Date
Msg-id 20060317053139.GA3711@fetter.org
Whole thread Raw
In response to Re: allow select from void function in void sql function  ("Jaime Casanova" <systemguards@gmail.com>)
List pgsql-patches
On Thu, Mar 16, 2006 at 10:56:43PM -0500, Jaime Casanova wrote:
> On 3/16/06, Pavel Stehule <pavel.stehule@hotmail.com> wrote:
> > Hello
> >
> > this small patch allow use sql for creating wrappers others void
> > functions.  Currently void SQL function have to be empty.
> >
> > create or replace function foo(int) returns void as ' ',''
> > language c ..; create or replace function foo() returns void as $$
> > select foo(10); $$language sql;
> >
>
> i'm not clear on what the use case of this can be... of course, my
> opinion is not very important :)

I can think of a case.  Let's imagine you want to do (roughly) the
equivalent of CALL, which we don't have yet.  This would let you have
what amounts to a stored procedure, i.e. something that takes an
action but doesn't return rows. :)

Cheers,
D
--
David Fetter <david@fetter.org> http://fetter.org/
phone: +1 415 235 3778        AIM: dfetter666
                              Skype: davidfetter

Remember to vote!

pgsql-patches by date:

Previous
From: "Jaime Casanova"
Date:
Subject: Re: allow select from void function in void sql function
Next
From: "Pavel Stehule"
Date:
Subject: Re: allow select from void function in void sql function