Re: FUNCTION problem

From: Peter Willis <peterw(at)borstad(dot)com>
To: Adrian Klaver <aklaver(at)comcast(dot)net>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: FUNCTION problem
Date: 2009-04-03 19:10:02
Message-ID: 49D65F0A.70107@borstad.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 argument list to eliminate the "as test(c1 int,c2 int)" clause. At this point it becomes a A-->B-->C problem i.e determine what 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Koczan 2009-04-03 21:03:26 pl/pgsql or control structures outside of a function?
Previous Message Tony Cebzanov 2009-04-03 18:22:32 Re: Performance problem with row count trigger