Re: Binary Transfer / Types - Mailing list psycopg

From Daniele Varrazzo
Subject Re: Binary Transfer / Types
Date
Msg-id AANLkTi=Ad5OyFaGGCNRGvqZyrTU5WuyUM5Xjy5P7qTps@mail.gmail.com
Whole thread Raw
In response to Binary Transfer / Types  (David Blewett <david@dawninglight.net>)
List psycopg
On Sat, Feb 26, 2011 at 4:54 PM, David Blewett <david@dawninglight.net> wrote:
> Apologies if this has been brought up before, but I was wondering if
> you knew about the existence of the libpqtypes library [1]? Could this
> provide an easier / more efficient way for psycopg2 to communicate
> with pg?
>
> 1. http://libpqtypes.esilo.com/

I've heard about it. It seems useful for a C program needing to use
directly the libpq, but I don't think it would make things easier for
psycopg. The most useful part of the library seems the variadic
functions (PQexecf, PQgetf), but Psycopg receives data in python
lists/mappings so populating a C structure iterating the Python
structures is fine enough.

Well, "will be" fine enough, as currently PQexecParams is not used at
all by psycopg. There are plans to add support for the *Params family
of function: we'll talk about them after releasing 2.4. The reasons
for which such support has not been added before are not the type of
problem libpqtypes seems designed to solve.

-- Daniele

psycopg by date:

Previous
From: Fabio Tranchitella
Date:
Subject: Re: zope+zope
Next
From: Daniele Varrazzo
Date:
Subject: Using real libpq parameters