Re: Functions returning RECORD - Mailing list pgsql-general

From postgresql@bryden.co.za
Subject Re: Functions returning RECORD
Date
Msg-id 46566.127.0.0.1.1105709854.squirrel@127.0.0.1
Whole thread Raw
In response to Re: Functions returning RECORD  (Michael Fuhr <mike@fuhr.org>)
List pgsql-general
This was very helpfull.

Thank you
Craig


> On Thu, Jan 13, 2005 at 07:58:33PM +0200, Craig Bryden wrote:
>
>> When I run     select * from GetAccountInfo (100)    I get the following
>> error message:
>> ERROR:  a column definition list is required for functions returning
>> "record"
>
> If the function will always return the same row type then create a
> composite type with CREATE TYPE and return that instead of RECORD.
>
>> please can someone explain to me how to create a column definition list.
>
> See the documentation for SELECT in the Reference part of the
> PostgreSQL documentation; the Examples section shows a query with
> a column definition list.  But you won't need a column definition
> list if you return a known type instead of RECORD.
>
> --
> Michael Fuhr
> http://www.fuhr.org/~mfuhr/
>


pgsql-general by date:

Previous
From: Horák Daniel
Date:
Subject: Re: Insufficient system resources for PostgreSQL 7.4.x?
Next
From: laurie.burrow@powerconv.alstom.com
Date:
Subject: Problem running native windows Postgres 8 pg_dump etc on cygwin from bash