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

From Rikard Pavelic
Subject Re: returning parameters from function
Date
Msg-id 457EB712.7000208@zg.htnet.hr
Whole thread Raw
In response to Re: returning parameters from function  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: returning parameters from function  (Richard Huxton <dev@archonet.com>)
List pgsql-general
Martijn van Oosterhout wrote:
> <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.
>
I know setof record will do if I explicitly name OUT parameters.
But I want Postgre to figure out for himself what parameters to return
as out parameters.

I don't see why it would make things very ambiguous.
Postgre now allows only one function with same set of input parameters.
So if you have function1(in int, out varchar) of course you can't have
another function1(in int)
What it could lead to is problems at running that were not seen at
designing function.

> 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,
>

Yeah, I understand pg needs only the body to execute the function, and
having another field in
pg_catalog.pg_proc besides prosrc maybe seems like wasting space but it
would make my life
as a developer a lot easier.

Regards,
Rikard

pgsql-general by date:

Previous
From: Matthias.Pitzl@izb.de
Date:
Subject: Re: returning parameters from function
Next
From: Richard Huxton
Date:
Subject: Re: returning parameters from function