Re: returning parameters from function - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: returning parameters from function
Date
Msg-id 20061212105533.GC28714@svana.org
Whole thread Raw
In response to returning parameters from function  (Rikard Pavelic <rikard.pavelic@zg.htnet.hr>)
Responses Re: returning parameters from function  ("Shoaib Mir" <shoaibmir@gmail.com>)
Re: returning parameters from function  (Rikard Pavelic <rikard.pavelic@zg.htnet.hr>)
List pgsql-general
On Tue, Dec 12, 2006 at 10:30:07AM +0100, Rikard Pavelic wrote:
> Hi!
>
> Is there any plan to add implicit declaration of returning parameters
> for functions?
> Something like:
> create function list(in a int) returns setof implicit record as

<snip>

Just "setof record" will do. As for the implicit declaration of
variable names, that's harder. I don't know if you can do that without
making things very ambiguous.

> One other feature that I miss, but no so much is:
> storing the entire function, not just the body
> (because of this pg cant remember exactly how I wrote the
> function, and if there are many parameters inside I get a looong first line)

You should get out what you put in, but it won't remember spacing
outside the function body because the lexer eats that.

I have a file with the function as I want it and edit that. That way I
can have the function exactly how I like it.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Metadata from NEW and OLD constructs?
Next
From: "Shoaib Mir"
Date:
Subject: Re: returning parameters from function