Re: libpq and prepared statements progress for 8.0
От | Oliver Jowett |
---|---|
Тема | Re: libpq and prepared statements progress for 8.0 |
Дата | |
Msg-id | 4148B23E.7020009@opencloud.com обсуждение исходный текст |
Ответ на | Re: libpq and prepared statements progress for 8.0 (Greg Stark <gsstark@mit.edu>) |
Ответы |
Re: libpq and prepared statements progress for 8.0
|
Список | pgsql-hackers |
Greg Stark wrote: > I was pretty shocked when I heard that JDBC implements the low level protocol > itself. It seems like a dead-end strategy to me. Any new protocol innovations > need to be implemented in every driver. Every implementation gets the chance > to reimplement the same bugs and same inefficiencies over and over again. There *are* benefits to implementing the protocol directly. First on my personal list is that our Java application would not be able to use postgresql at all if the driver required JNI/libpq. There are also some things in the JDBC API that seem hard to map to the current libpq API, e.g. streaming parameter data from a Java stream without taking an intermediate copy. The protocol implementation is not really all that complex. The implementation for both V2 and V3 weighs in at ~6k lines of Java out of ~38k total, and much of that is connection-state juggling that we'd have to do anyway if using libpq (working out when to send BEGIN, breaking up multiple-statement queries into individual statements and matching the results up, managing portal state, etc). -O
В списке pgsql-hackers по дате отправления: