Re: hstores in pl/python

From: Christophe Pettus <xof(at)thebuild(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jan Urbański <wulczer(at)wulczer(dot)org>, Postgres - Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: hstores in pl/python
Date: 2010-12-14 05:32:29
Message-ID: 6015EDD2-1095-46ED-B88D-99BE01E1BC8F@thebuild.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Dec 13, 2010, at 7:19 PM, Robert Haas wrote:
> If we decree that Python dictionaries map
> onto hstore, does that mean they DON'T map onto json, or Pavel's
> hand-wavy proposal for associative arrays? Because from 10,000 feet
> it sure isn't obvious why hstore would be preferable to either of the
> other two, except that it already exists and the early bird gets the
> worm.

I'll mention that psycopg2, the most widely Python DBI implementation for PostgreSQL, has a built-in mapping of hstore to dict, so signs are definitely pointing towards a hstore == dict standardization. It also suffers from the problem that it needs to sniff the hstore OID, which is somewhat annoying, especially in a web environment where the sniff has to happen repeatedly.

--
-- Christophe Pettus
xof(at)thebuild(dot)com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2010-12-14 06:02:27 Re: Re: Proposed Windows-specific change: Enable crash dumps (like core files)
Previous Message KaiGai Kohei 2010-12-14 04:40:25 Re: rest of works for security providers in v9.1