Re: Stored functions - Mailing list pgsql-general

From Tino Wildenhain
Subject Re: Stored functions
Date
Msg-id 4305C525.2080506@wildenhain.de
Whole thread Raw
In response to Stored functions  (Nigel Horne <njh@bandsman.co.uk>)
List pgsql-general
Nigel Horne schrieb:
> The on-line manual,
> http://www.postgresql.org/docs/8.0/interactive/index.html,
> doesn't describe how to call stored functions, or if it does
> it's well hidden.
>
> Are there some examples anywhere? After
> googling I can find much duplication of non-data (people
> love to mirror sites don't they?) but no real examples.
>
http://www.postgresql.org/docs/8.0/interactive/plpgsql-control-structures.html

it depends on the type of function how to use it.
Simple, value returning functions would be called just
like any other SQL builtin function:

SELECT yourfunction(arg1,arg2), othercoulmns, ... FROM ...

or SELECT yourfunction(arg1,arg2); if you just want to
call this function.

Set returning functions can be used like this
or SELECT col1,col2 FROM yoursetreturningfunction();

or SELECT yoursetreturningfunction();

or even in JOINs


pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Stored functions
Next
From: Együd Csaba
Date:
Subject: Re: How to DES encrypt/decrypt strings from PL/pgSQL