Re: prepared statement: are they pre-compiled?

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: prepared statement: are they pre-compiled?
Дата
Msg-id 468CE300.3030405@enterprisedb.com
обсуждение исходный текст
Ответ на prepared statement: are they pre-compiled?  (Flipper <flipper@gammadue.com>)
Список pgsql-jdbc
(please keep the list cc'd so that others can answer and benefit from
the discussions as well)

Flipper wrote:
> thank you for the quick reply. May I ask something more in order to understand
> if I'm right? When you use a Statement you should use  a simple query
> protocol (i.e., without a bind) but from the driver code I see that the
> sequence of messages is always the same, that is parse, bind, execute....
> I thought the simple query protocol does not include the parse+bind steps,
> since they should be in the extended query protocol.....am I wrong?

I think we use the extended query protocol for all queries, including
those issued from a Statement. That means we still send a Bind message,
there just isn't any parameter values in it. Note that we don't wait for
a response after each message, so that doesn't cause extra round trips
to the server.

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: prepared statement: are they pre-compiled?
Следующее
От: Alessandro Di Bella
Дата:
Сообщение: Bug in org.postgresql.jdbc2.AbstractJdbc2Array