Binary params in libpq

From: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Binary params in libpq
Date: 2011-02-27 18:13:58
Message-ID: AANLkTik1D2L4cW-U=NAwGT3mQ7045Gh+EX+4GUbEy2cb@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sean Laurent 2011-02-27 18:30:21 Hot Standby - ERROR: canceling statement due to conflict with recovery
Previous Message Magnus Hagander 2011-02-27 18:00:30 Re: Linking against static libpq using Visual C++