pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
select from a dynamic table name 2+ messages / 2 participants [nested] [flat]
* select from a dynamic table name @ 2001-11-02 06:58 Jason Kwok <jason@newhonest.com> 2001-11-05 23:07 ` Re: select from a dynamic table name David Stanaway <david@netventures.com.au> 0 siblings, 1 reply; 2+ messages in thread From: Jason Kwok @ 2001-11-02 06:58 UTC (permalink / raw) To: pgsql-sql Since I could return a rowset (some records) from a function of pgsql or plpgsql, I saved all the records into a temp file. Then I want to get the rowset by another select statement from this temp table with dynamic name, could I do something like the folowing : select * from a_dynamic_table_name ? If the a_dynamic_table_name could be specified as a function, it would be great, because inside the function I could insert the needed rows into the temp file and then return its name for the select statement. Is this possible? == ==== Best Regards Jason Kwok ============== ==== --- Virus Free Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.292 / Virus Database: 157 - Release Date: 2001/10/26 ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: select from a dynamic table name 2001-11-02 06:58 select from a dynamic table name Jason Kwok <jason@newhonest.com> @ 2001-11-05 23:07 ` David Stanaway <david@netventures.com.au> 0 siblings, 0 replies; 2+ messages in thread From: David Stanaway @ 2001-11-05 23:07 UTC (permalink / raw) To: pgsql-sql; +Cc: Jason Kwok <jason@newhonest.com> On Friday, November 2, 2001, at 05:58 PM, Jason Kwok wrote: > Since I could return a rowset (some records) from a function of pgsql or > plpgsql, I saved all the records into a temp file. Then I want to get > the > rowset by another select statement from this temp table with dynamic > name, > could I do something like the folowing : > > select * from a_dynamic_table_name ? How about exec 'select * from '&somefunc(); Where somefunc() returns the name of the temporary table. You'll have to delete it after, so it will be a little more messy. There was talk in the list on functions returning record sets being a feature of 7.2 and there being some patches for 7.1 that permited it. Jan Wieck <JanWieck@Yahoo.com> Wrote on Wed Aug 15, 2001 03:49:03 PM Australia/Sydney > As said, in v7.2 we'll have the ability to return cursors > from functions (and I'm looking actually into the ability of > doing RETURN AND RESUME). So there is at least some sort of > workaround on the horizon. ============================== David Stanaway Personal: david@stanaway.net Work: david@netventures.com.au ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2001-11-05 23:07 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2001-11-02 06:58 select from a dynamic table name Jason Kwok <jason@newhonest.com> 2001-11-05 23:07 ` David Stanaway <david@netventures.com.au>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox