Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group