Re: hstores in pl/python

From: Dmitriy Igrishin <dmitigr(at)gmail(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: 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-13 15:01:11
Message-ID: AANLkTinM+WW6mxxrm+XbjZ7B0BdbpkjD=jkj+_W5+PEm@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Interesting argument.
I can ask, how many people knows what is tsvector or tsquery ?
Or how many people knows what is polygon or path ?
The answer is: everyone who need or using it.

Hstore is a proven and well designed solution. And in fact I am
surprising why it does not in core yet?!

2010/12/13 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>

> 2010/12/13 Dmitriy Igrishin <dmitigr(at)gmail(dot)com>:
> > Hey Pavel,
> >
> > 2010/12/13 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
> >>
> >> Hello
> >>
> >> this is little bit offtopic, sorry.
> >>
> >> I am thinking, so we need a standard associative array support in core
> >> - like Perl, Python or Javascript. So, I don't think, so migration of
> >> hstore to core is good idea.
> >
> > Could you tell why in-core associative array support would be better
> > than in-core hstore support ?
> > We enjoying to use hstore and thinking that it is implemented great.
> >>
>
> Because hstore is PostgreSQL specific type. More well known syntax is
> better. More - who know, what is hstore? But everybody know, what is
> associative array or hash.
>
> Pavel
>
> >> Regards
> >>
> >> Pavel Stehule
> >>
> >> 2010/12/13 Jan Urbański <wulczer(at)wulczer(dot)org>:
> >> > 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
> >> >
> >> > --
> >> > Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> >> > To make changes to your subscription:
> >> > http://www.postgresql.org/mailpref/pgsql-hackers
> >> >
> >>
> >> --
> >> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> >> To make changes to your subscription:
> >> http://www.postgresql.org/mailpref/pgsql-hackers
> >
> >
> >
> > --
> > // Dmitriy.
> >
> >
> >
>

--
// Dmitriy.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2010-12-13 15:01:35 Re: hstores in pl/python
Previous Message Andrew Dunstan 2010-12-13 14:55:42 Re: Optimize PL/Perl function argument passing [PATCH]