[pgadmin-hackers] Re: Server side cursor limitations for on demand loading of data inquery tool [RM2137] [pgAdmin4]

Поиск
Список
Период
Сортировка
От Dave Page
Тема [pgadmin-hackers] Re: Server side cursor limitations for on demand loading of data inquery tool [RM2137] [pgAdmin4]
Дата
Msg-id CA+OCxozb7qDTiskHXv08G5TrCi7zmhR7Csz=x9V4ermehyO8cg@mail.gmail.com
обсуждение исходный текст
Ответ на [pgadmin-hackers] Server side cursor limitations for on demand loading of data in querytool [RM2137] [pgAdmin4]  (Harshal Dhumal <harshal.dhumal@enterprisedb.com>)
Ответы [pgadmin-hackers] Re: Server side cursor limitations for on demand loading of data inquery tool [RM2137] [pgAdmin4]
Список pgadmin-hackers
Hi

On Tue, Apr 25, 2017 at 8:41 AM, Harshal Dhumal <harshal.dhumal@enterprisedb.com> wrote:
Hi Dave,

To implement feature #2137 we'll need to use server cursor. However server cursor has some
limitation.
For eg.
1. It cannot execute BEGIN; query (basically user cannot start new database transaction)
2. In case if Auto commit is true then we try to execute user queries inside BEGIN and END when ever it's possible even though user has not put BEGIN and END in his query.

Also not all queries executed using Query tool produces records as result. So can we assume only
queries started with SELECT should be executed using server cursor to support on demand loading.
Or should we give user an option to use on demand loading like we have options for Auto commit? and Auto rollback?
In case of on demand loading option user will be responsible to execute correct queries (queries which can be executed using server cursor)

Let me know your opinion on this.

Hmm, those are good points. 

So, as a first step, there's no absolute requirement to use a server side cursor here. The results can be materialised in libpq/psycopg2 (perhaps using an async query), then transferred to the client in batches as described in the ticket.

I think this would be a significant improvemet - we can re-visit the possibility of using server side cursors in the future when we have more ability to parse the query string before executing it (something we will want to do when we merge query tool/edit grid functionality).

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

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

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: [pgadmin-hackers] HTTPS ignored on redirect
Следующее
От: Dave Page
Дата:
Сообщение: Re: [pgadmin-hackers] [pgAdmin4][PATCH] To fix the issue of defaultparameters ordering in Functions