Re: dblink / plpgsql - definition list cheats for record

From: Matthew Peter <survivedsushi(at)yahoo(dot)com>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: dblink / plpgsql - definition list cheats for record
Date: 2006-11-10 01:46:43
Message-ID: 20061110014643.20586.qmail@web35211.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


--- Richard Huxton <dev(at)archonet(dot)com> wrote:

> 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.
>

It's a dblink C function that returns RECORD so I just wanted to create a view or
type to help it reference the return data as ( TYPE ) rather than typing a
definition list as ( id integer, .. ) each time for each query.


____________________________________________________________________________________
Want to start your own business?
Learn how on Yahoo! Small Business.
http://smallbusiness.yahoo.com/r-index

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Glen Parker 2006-11-10 02:04:46 Re: AutoVacuum on demand?
Previous Message Tom Lane 2006-11-10 01:33:57 Re: Remote tables infrastructure.