hstores in pl/python

Поиск
Список
Период
Сортировка
От Jan Urbański
Тема hstores in pl/python
Дата
Msg-id 4D05D05A.3020100@wulczer.org
обсуждение исходный текст
Ответы Re: hstores in pl/python  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: hstores in pl/python  (Oleg Bartunov <oleg@sai.msu.su>)
Re: hstores in pl/python  (Robert Haas <robertmhaas@gmail.com>)
Re: hstores in pl/python  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
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!)*
createan 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
tocreate 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
isloaded 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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: ALTER TABLE ... ADD FOREIGN KEY ... NOT ENFORCED
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: pg_archivecleanup should remove WAL files also in pg_xlog?