Re: hstores in pl/python - Mailing list pgsql-hackers

From Christophe Pettus
Subject Re: hstores in pl/python
Date
Msg-id 6015EDD2-1095-46ED-B88D-99BE01E1BC8F@thebuild.com
Whole thread Raw
In response to Re: hstores in pl/python  (Robert Haas <robertmhaas@gmail.com>)
List 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
todict, so signs are definitely pointing towards a hstore == dict standardization.  It also suffers from the problem
thatit needs to sniff the hstore OID, which is somewhat annoying, especially in a web environment where the sniff has
tohappen repeatedly. 

--
-- Christophe Pettus  xof@thebuild.com



pgsql-hackers by date:

Previous
From: KaiGai Kohei
Date:
Subject: Re: rest of works for security providers in v9.1
Next
From: Craig Ringer
Date:
Subject: Re: Re: Proposed Windows-specific change: Enable crash dumps (like core files)