From: | Josh Berkus <josh(at)agliodbs(dot)com> |
---|---|
To: | Steve Singer <steve(at)ssinger(dot)info> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: transforms |
Date: | 2013-03-04 01:13:23 |
Message-ID: | 5133F533.7080907@agliodbs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> This (creating the extensions) works fine for me on a Ubuntu 10.x system
>
Hmmmm. So I wiped everything out and retried this with clean
directories, and it worked fine. Now I'm not sure how I got the error
in the first place.
Anyway, the feature seems to work as expected:
create function look_up_hstore (
some_hs hstore, which_key text )
returns text
language plpythonu as $f$
return some_hs[which_key]
$f$;
postgres=# create table storit ( it hstore );
CREATE TABLE
postgres=# insert into storit values ( 'f => josh,l=>berkus'
),('f=>jan,l=>wieck'),('f=>tom,l=>lane');
INSERT 0 3
postgres=# select look_up_hstore(it,'f') from storit;
look_up_hstore
----------------
josh
jan
tom
(3 rows)
I'll have to think of other ways to test it out, but right now it seems
to pass muster. I was a little unclear on what Python data structure an
ltree should produce.
Now if only we can work out the combinatorics issue ...
--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2013-03-04 01:25:29 | Re: Re: Proposal for Allow postgresql.conf values to be changed via SQL [review] |
Previous Message | Greg Smith | 2013-03-04 01:07:48 | Re: Re: Proposal for Allow postgresql.conf values to be changed via SQL [review] |