Another hstore_type idea

From: "Marc Mamin" <M(dot)Mamin(at)intershop(dot)de>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Another hstore_type idea
Date: 2011-12-23 12:06:20
Message-ID: C4DAC901169B624F933534A26ED7DF310861B269@JENMAIL01.ad.intershop.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

after reading the thread on "Typed hstore proposal", I wonder if another
minded extension of hstore would be benefical:
add additional hstore types with numerical data type for the values.

e.g.: hstore_float : text -> float

This should allow to add some nice aggregation function on these hstore,
e.g.

select distinct_sum(x) from
(
a -> 1 b -> 5
a -> 3 c -> 2
)

=>

a -> 4 b -> 5 c -> 2

I have a small case where I'm doing this with a custom type (text,
float) , but with poor performances.
I guess that such an extension would make sense if it were to bring a
significant performance gain compared to the custom type approach.

best regards and Merry Christmas,

Marc Mamin

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-12-23 13:23:09 Re: Moving more work outside WALInsertLock
Previous Message Magnus Hagander 2011-12-23 11:54:22 Re: xlog location arithmetic