Re: Anonymous code blocks - Mailing list pgsql-hackers

From Merlin Moncure
Subject Re: Anonymous code blocks
Date
Msg-id b42b73150909221044r7f0d81e1me15b81621d6c915c@mail.gmail.com
Whole thread Raw
In response to Re: Anonymous code blocks  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Anonymous code blocks
List pgsql-hackers
On Sat, Sep 19, 2009 at 8:23 PM, Andrew Dunstan <andrew@dunslane.net> wrote:
> Dimitri Fontaine wrote:
>>
>> So here are the major points about this patch:
>>
>>  - it's missing the returns declaration syntax (default value could be
>>   returns void?)
>>
>>  - it would be much more friendly to users if it had a default output
>>   for queries, the returned object seems a good fit
>>
>
> Really? That wasn't my expectation at all. I expected that the code would in
> effect be always returning void. I think you're moving the goalposts a bit
> here. I don't think we need a RETURNS clause on it for it to be useful.

A note about void returning functions....there are no send/recv
functions for the void type which will cause problems for users of
this feature over the binary protocol.  You can work around this with
normal functions by forcing them to return a value but not with ACB.
Is there any reason why void doens't have send/recv?

merlin


pgsql-hackers by date:

Previous
From: Jaime Casanova
Date:
Subject: Re: [PATCH] Largeobject access controls
Next
From: Robert Haas
Date:
Subject: Re: Anonymous code blocks vs CREATE LANGUAGE