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

Re: Hstore array implementation.

From: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
To: Ronan Dunklau <rdunklau(at)gmail(dot)com>
Cc: psycopg(at)postgresql(dot)org
Subject: Re: Hstore array implementation.
Date: 2011-10-06 10:16:51
Message-ID: (view raw, whole thread or download thread mbox)
Lists: psycopg
On Thu, Oct 6, 2011 at 8:00 AM, Ronan Dunklau <rdunklau(at)gmail(dot)com> wrote:
> Hello.
> I have implemented an Hstore array type converter for psycopg2.
> I thought it may be of interest to you, even if I'm afraid I may have
> forgotten things in my implementation.
> You can look at the patch here:

Hi Ronan,

thank you for the effort. But I've already added generic array support
for psycopg. Or, better, the support was there, but was available only
in C and was not exposed to Python.

I've added the function new_array_type(), which is similar to
new_type: it takes a type caster for a single item and a list of oids
and creates a new type caster to parse array of the same types: see
With this extension, now hstore and composite types casters support
arrays too. I think fog hasn't reviewed these patched yet so things
are not set in stone, but exposing the internal array handling system
to python seems a good idea. They should be released in the upcoming

I'm sorry for having had your time wasted: we had a ticket open on the
feature (
and I'd closed it two weeks ago. I was probably not enough as
communication (but then, I don't know if you approached the problem
because you found the ticket or you needed it for yourself).

Thank you anyway!

-- Daniele

In response to


psycopg by date

Next:From: Daniele VarrazzoDate: 2011-10-06 10:31:04
Subject: Re: psycopg and gevent with pgbouncer
Previous:From: Marko KreenDate: 2011-10-06 08:54:06
Subject: Re: psycopg and gevent with pgbouncer

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