Re: Stored Procedure Question

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Greg Quinn <greg(at)officium(dot)co(dot)za>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Stored Procedure Question
Date: 2006-06-17 17:13:55
Message-ID: 20060617171355.GA71832@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Sun, Jun 18, 2006 at 06:42:28PM +0200, Greg Quinn wrote:
> I am creating a simple FUNCTION that returns a few columns of data from a
> table.
>
> Just a question, in order to get this working, is there a general type I can
> return, that I can use as a generic type for all my different functions?
>
> Or do I need to create a custom type for each FUNCTION?

In 8.1 you can use OUT or INOUT parameters; in earlier versions you
can create a custom type or use "record". If you return "record"
then you'll need to provide a column list when you call the function.

--
Michael Fuhr

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Bruno Wolff III 2006-06-17 18:16:13 Re: Calculate difference between rows.
Previous Message Tom Lane 2006-06-17 16:44:49 Re: cannot access directory /pg_tblspc/*