Re: returning parameters from function

From: Rikard Pavelic <rikard(dot)pavelic(at)zg(dot)htnet(dot)hr>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: returning parameters from function
Date: 2006-12-12 14:05:06
Message-ID: 457EB712.7000208@zg.htnet.hr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rikard Pavelic 2006-12-12 14:06:29 Re: returning parameters from function
Previous Message Richard Huxton 2006-12-12 13:48:43 Re: where can i find posges sql include directory...FC5.installing