Re: Returning multiple result sets

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Returning multiple result sets
Дата
Msg-id 20051119230208.GB16420@surnet.cl
обсуждение исходный текст
Ответ на Re: Returning multiple result sets  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Returning multiple result sets  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-hackers
Tom Lane wrote:
> Martijn van Oosterhout <kleptog@svana.org> writes:
> > So, kill a few birds with one stone. Any thoughts?
> 
> I don't think any of this will actually work :-(.  There's too much code
> that assumes that all the tuples returned by a query are alike, and I
> for one don't feel like trying to find and fix it all.  (Not all of it
> is within our control, either --- this will break client code along with
> the backend.)

Hmm -- probably we could declare that the current libpq API will not
support multiple result sets from one query, and return only the first
one to the application discarding the rest.  (It just occured to me --
what happens if one send multiple SELECTs in a semicolon-separated query
via libpq?).  New apps wanting to take advantage of the new
functionality would need to invoke a different function.

At the protocol level this will need an extension anyway, so clients
using the protocol directly would need to be updated to understand
multiple results.

I know people migrating from SQL Server (maybe others?) are already
having trouble because of our inability to return multiple result sets.
The sooner we do it, the sooner all the code will be fixed ...

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: PCTFree Results
Следующее
От: Andrew - Supernews
Дата:
Сообщение: Re: order by, for custom types