Re: Anonymous code blocks - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: Anonymous code blocks
Date
Msg-id 162867790909200825gf90c49fxfbc7cba94ce8d90c@mail.gmail.com
Whole thread Raw
In response to Re: Anonymous code blocks  (Dimitri Fontaine <dfontaine@hi-media.com>)
List pgsql-hackers
2009/9/20 Dimitri Fontaine <dfontaine@hi-media.com>:
> Hi,
>
> Tom Lane <tgl@sss.pgh.pa.us> writes:
>> Andrew Dunstan <andrew@dunslane.net> writes:
>>> 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.
>
> Yes it'd be useful without it too, and this can come in later in the
> game, granted too. Will continue review without it.

Hello

I think so RETURN there has some sense. It should be optional, and
have to specify exit status. So return non zero value means exit psql
with returned value as exit status.

It would be interesting, if we could access from anonymous block some
psql internal variables.

regards
Pavel Stehule


pgsql-hackers by date:

Previous
From: Abhijit Menon-Sen
Date:
Subject: Re: GRANT ON ALL IN schema
Next
From: Tom Lane
Date:
Subject: Re: updated hstore patch