Re: Stored Procedure Question - Mailing list pgsql-novice

From Michael Fuhr
Subject Re: Stored Procedure Question
Date
Msg-id 20060617171355.GA71832@winnie.fuhr.org
Whole thread Raw
In response to Stored Procedure Question  ("Greg Quinn" <greg@officium.co.za>)
Responses Re: Stored Procedure Question  ("Greg Quinn" <greg@officium.co.za>)
List 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

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: cannot access directory /pg_tblspc/*
Next
From: "Greg Quinn"
Date:
Subject: Re: Stored Procedure Question