Re: Stored functions

From: Tino Wildenhain <tino(at)wildenhain(dot)de>
To: Nigel Horne <njh(at)bandsman(dot)co(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Stored functions
Date: 2005-08-19 11:40:21
Message-ID: 4305C525.2080506@wildenhain.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bauhofer Mario 2005-08-19 11:44:08 copy from ignores \,
Previous Message Martijn van Oosterhout 2005-08-19 11:38:32 Re: Stored functions