Re: transforms - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: transforms
Date
Msg-id 5133F533.7080907@agliodbs.com
Whole thread Raw
In response to Re: transforms  (Steve Singer <steve@ssinger.info>)
Responses Re: transforms
List 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
----------------joshjantom
(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



pgsql-hackers by date:

Previous
From: Greg Smith
Date:
Subject: Re: Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]
Next
From: Josh Berkus
Date:
Subject: Re: Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]