Re: [HACKERS] libpq: why we need to fetch all rows?
| От | Bruce Momjian |
|---|---|
| Тема | Re: [HACKERS] libpq: why we need to fetch all rows? |
| Дата | |
| Msg-id | f9d805750ae26f93856b40f2c6a907fe обсуждение исходный текст |
| Ответ на | [HACKERS] libpq: why we need to fetch all rows? (Alexander Demenshin <aldem@techie.com>) |
| Список | pgsql-hackers |
> > On Sun, Jun 29, 1997 at 01:44:36PM -0400, Bruce Momjian wrote: > > > Because it is not standard SQL. No database I know of returns multiple > > rows with out a 'declare' statement and a cursor. Actually, standard SQL requires a cursor so you can name the cursor to fetch from, but PostgreSQL requires it to be in a transaction, which is not standard. > > Not so good... But then, why not to modify backend and libpq > in a way, which will allow to fetch rows one-by-one? OK, can you run a test? If you start a transaction, declare a cursor, and do a fetch over and over again, does it return one line at a time from the server. I think it does. Now, it will not return from the first fetch until the query has finished executing, but I don't think it will send all the results to the client, only one at a time. - -- Bruce Momjian maillist@candle.pha.pa.us ------------------------------
В списке pgsql-hackers по дате отправления: