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