Re: dblink / plpgsql - definition list cheats for record - Mailing list pgsql-general

From Richard Huxton
Subject Re: dblink / plpgsql - definition list cheats for record
Date
Msg-id 4552F449.8020203@archonet.com
Whole thread Raw
In response to dblink / plpgsql - definition list cheats for record returning functions?  (Matthew Peter <survivedsushi@yahoo.com>)
Responses Re: dblink / plpgsql - definition list cheats for record  (Matthew Peter <survivedsushi@yahoo.com>)
List pgsql-general
Matthew Peter wrote:
> Is there any way to use CREATE TYPE or an VIEW/TABLE defintion list instead of
> manually defining it?

Yes, just define your function as returning that type rather than
RECORD. That way the calling context will know what to expect.

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: TRIGGERS - access sql query_string that called it?
Next
From: Richard Ollier
Date:
Subject: Table design - unknown number of column