Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Returning multiple resultset from table through function

Status
Not open for further replies.

RahulGade

Programmer
Jul 17, 2001
25
IN
To return multiple resultset from a "select * ..." command
we can use the temp table to store that records in postgres 7.0.2 or later.
we have to use the syntax inside the function like :

create temp table tmp as select * from tablename;

and use another command in the same connection session but with different query batch. as select * from tmp;

it will give the same result as that of sored proc in other sql.

But i am still facing one problem with this how to use that same function in a single connection session.

However,
1) The drop table dosen't work inside function, it's bug.
2) For the checking existance of temp table in system for that connection session i haven't got any other.
3) Even using drop table in single command after execution of the above funtion will not allow to execute that function second time in the same connection session.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top