Skip site navigation (1) Skip section navigation (2)

Re: Binary Transfer / Types

From: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
To: David Blewett <david(at)dawninglight(dot)net>
Cc: psycopg(at)postgresql(dot)org
Subject: Re: Binary Transfer / Types
Date: 2011-02-26 18:03:00
Message-ID: (view raw, whole thread or download thread mbox)
Lists: psycopg
On Sat, Feb 26, 2011 at 4:54 PM, David Blewett <david(at)dawninglight(dot)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.

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

In response to

psycopg by date

Next:From: Daniele VarrazzoDate: 2011-02-26 23:40:59
Subject: Using real libpq parameters
Previous:From: David BlewettDate: 2011-02-26 16:54:34
Subject: Binary Transfer / Types

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group