Re: FUNCTION problem - Mailing list pgsql-sql

From Peter Willis
Subject Re: FUNCTION problem
Date
Msg-id 49D65F0A.70107@borstad.com
Whole thread Raw
In response to Re: FUNCTION problem  (Adrian Klaver <aklaver@comcast.net>)
List pgsql-sql
Adrian Klaver wrote:
>
> 
> If you are using Postgres 8.1+ then it becomes even easier because you can use OUT parameters in the function
argumentlist to eliminate the "as test(c1 int,c2 int)" clause. At this point it becomes a A-->B-->C problem i.e
determinewhat your inputs are, how you want to process them and how you want to return the output.
 
> 

'8.1+'?? Hmmm, I'm using 8.3. I could use that.

I got the more complex version of the query to work
by backing away from 'plpgsql' as the language and using
'sql' instead.

I then nested (terribly ugly) my select statements to
generate a single SQL query from all. This allows
me to change the output of the query without needing
to define a new set of output 'OUT' parameters each time
I change things.

I have use of the 'OUT' parameters with another set
of functions though. Thanks for that.

Peter


pgsql-sql by date:

Previous
From: Tony Cebzanov
Date:
Subject: Re: Performance problem with row count trigger
Next
From: Peter Koczan
Date:
Subject: pl/pgsql or control structures outside of a function?