From: | Oleg Bartunov <oleg(at)sai(dot)msu(dot)su> |
---|---|
To: | Jan Urbański <wulczer(at)wulczer(dot)org> |
Cc: | Postgres - Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: hstores in pl/python |
Date: | 2010-12-13 16:06:29 |
Message-ID: | Pine.LNX.4.64.1012131856020.12632@sn.sai.msu.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
My most serious pro about hstore in core is a better dump/restore
support. Also, since we have so much better hstore and people started
to use it in their projects, it'd be great to have built-in feature in
PostgreSQL, which mimic key-value or document-oriented database.
Oleg
On Mon, 13 Dec 2010, Jan Urbaski wrote:
> It would be cool to be able to transparently use hstores as Python
> dictionaries and vice versa. It would be easy enough with hstore as a
> core type, but with hstore as an addon it's not that easy.
>
> There was talk about including hstore in core, is there still chance for
> that to happen in 9.1? I'd like to include hstore<->dict handling, but
> with hstore out-of-core the only half-sane way I see is:
> * hack PL/Python's makefile to add -Icontrib/hstore (yuck!)
> * create an extension module for Python that knows how to handle
> hstores that would live next to plpython.so
> * install it in $libdir on make install
> * when PL/Python receives or is asked to create an hstore, load the
> extension module and use it to parse the value (ugly, probably slow)
> * the module would also have to make sure hstore.so is loaded in the
> database, which in itself is not pretty, as it would refer to
> hstore_in/out symbols
>
> I wrote a module that can be used with current PL/Python to simplify
> hstore handling (https://github.com/wulczer/pyhstore) but it suffers
> from most of the aforementioned problems, and on top of that you get
> hstore->text->dict instead of just hstore->dict, which sucks.
>
> Cheers,
> Jan
>
>
Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru)
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2010-12-13 16:06:32 | Re: ALTER EXTENSION ... UPGRADE; |
Previous Message | Andrew Dunstan | 2010-12-13 16:05:44 | Re: Complier warnings on mingw gcc 4.5.0 |