Re: [BUG] pg_stat_statements and extended query protocol

Поиск
Список
Период
Сортировка
От Imseih (AWS), Sami
Тема Re: [BUG] pg_stat_statements and extended query protocol
Дата
Msg-id EF29FF61-B68A-4E1C-9572-2AF681A33C8D@amazon.com
обсуждение исходный текст
Ответ на Re: [BUG] pg_stat_statements and extended query protocol  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: [BUG] pg_stat_statements and extended query protocol  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> So...  The idea here is to set a custom fetch size so as the number of
> calls can be deterministic in the tests, still more than 1 for the
> tests we'd have.  And your point is that libpq enforces always 0 when
> sending the EXECUTE message causing it to always return all the rows
> for any caller of PQsendQueryGuts().

That is correct.

> The extended protocol allows that, so you would like a libpq API to
> have more control of what we send with EXECUTE:
> https://www.postgresql.org/docs/current/protocol-overview.html#PROTOCOL-QUERY-CONCEPTS


> The extended query protocol would require multiple 'E' messages, but
> we would not need multiple describe or bind messages, meaning that
> this cannot just be an extra flavor PQsendQueryParams().  Am I gettig
> that right?  

Correct, there will need to be separate APIs for Parse/Bind, Execute
and Close of a Portal.


> The correct API design seems tricky, to say the least.
> Perhaps requiring this much extra work in libpq for the purpose of
> having some tests in this thread is not a brilliant idea..  Or perhaps
> we could just do it and have something a-la-JDBC with two routines?
> That would be one libpq routine for describe/bind and one for execute
> where the limit can be given by the caller in the latter case, similar
> to sendDescribeStatement() and sendExecute() in
> QueryExecutorImpl.java.

I am not too clear on your point here. ISTM you are suggesting adding
new libpq APis similar to JDBC, which is what I am also suggesting.

Did I understand correctly?


--
Sami Imseih
Amazon Web Services (AWS)




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

Предыдущее
От: Jacob Champion
Дата:
Сообщение: Re: [PATCH] Add `verify-system` sslmode to use system CA pool for server cert
Следующее
От: Melanie Plageman
Дата:
Сообщение: Re: Should vacuum process config file reload more often