> 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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to