Binary params in libpq - Mailing list pgsql-general

From Daniele Varrazzo
Subject Binary params in libpq
Date
Msg-id AANLkTik1D2L4cW-U=NAwGT3mQ7045Gh+EX+4GUbEy2cb@mail.gmail.com
Whole thread Raw
Responses Re: Binary params in libpq  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-general
Hello,

I'm thinking about adding support for PQexecParams and PQprepare in
Psycopg. I've posted more details yesterday on the Psycopg mailing
list <http://archives.postgresql.org/psycopg/2011-02/msg00076.php>. I
have a few preliminary questions:

How stable is the binary representation for the PostgreSQL types? We
may just pass bytea data in binary format and pass everything else as
text parameters, or pass different types too as binary, if performace
would benefit. Did binary format ever changed in the past (at least
since the introduction of the V3 protocol)? Is such binary
representation more likely to change in the future respect to the
textual one, in a way that forward/backward compatibility between
server and client would be compromised?

Query plans for prepared statements may be less efficient than ones
for queries with bound parameters. Are query plans generated for
PQexecParams calls as efficient as the ones generated for PQexec? Or
do they have the same limitation of the ones generated for PQprepare?

Thank you,

-- Daniele

pgsql-general by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Linking against static libpq using Visual C++
Next
From: Sean Laurent
Date:
Subject: Hot Standby - ERROR: canceling statement due to conflict with recovery