Multiple result sets - Mailing list pgsql-general

From Clodoaldo
Subject Multiple result sets
Date
Msg-id a595de7a0806011144n36c59e48n92384ff707b4b54@mail.gmail.com
Whole thread Raw
Responses Re: Multiple result sets  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Multiple result sets  ("Adam Rich" <adam.r@sbcglobal.net>)
List pgsql-general
I need that 5 queries, fired from the same ajax request to a web
python application, see the same database snapshot. The driver is
psycopg2.

Since postgresql 8.2 functions can't return multiple result sets what
would be the best aproach?

All 5 queries return 2 columns but they are different types in each
query. I could just do a union casting everything to text, adding one
column identifying each query and then recast when receiving the
result set. But that could be costly (i guess the union is) and not
elegant at all. Those queries will fill select boxes and the ajax
refresh should be very fast.

Regards, Clodoaldo Pinto Neto

pgsql-general by date:

Previous
From: Tino Wildenhain
Date:
Subject: Re: Defining character sets for indicidual fields
Next
From: Tom Lane
Date:
Subject: Re: Multiple result sets