DBLink or setof record functions & type shortcuts

From: Jeff Trout <threshar(at)torgo(dot)978(dot)org>
To: pgsql-sql(at)postgresql(dot)org
Subject: DBLink or setof record functions & type shortcuts
Date: 2007-12-19 15:23:16
Message-ID: 9A3471C2-F486-493B-89C5-E390904D74C9@torgo.978.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

So I'm using dblink to run a query on another db, which works fine.

I'm wondering if there is some shortcut I can use since I have the
type the remote function is returning defined on my side so I don't
need to list all the columns -
so instead of select * from dblink('select * from
someFooTypeReturningFunc()') as t1(col text, ....)
I could write select * from dblink('select ... ') as t1(footype)

I've poked over the docs and googled around, haven't seen anything yet.

--
Jeff Trout <jeff(at)jefftrout(dot)com>
http://www.dellsmartexitin.com/
http://www.stuarthamm.net/

Browse pgsql-sql by date

  From Date Subject
Next Message Iuri Sampaio 2007-12-20 05:29:13 sql query - create replace function
Previous Message Ireneusz Pluta 2007-12-19 13:21:29 Re: Insert into and Sequence