| From: | Andy Colson <andy(at)squeakycode(dot)net> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: hstore, but with fast range comparisons? |
| Date: | 2014-11-13 22:28:56 |
| Message-ID: | 546530A8.80808@squeakycode.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On 11/13/2014 3:46 PM, Guyren Howe wrote:
> I want to do something that is perfectly satisfied by an hstore column. *Except* that I want to be able to do fast (ie indexed) <, > etc comparisons, not just equality.
>
> From what I can tell, there isn’t really any way to get hstore to do this, so I’ll have to go to a key-value table. But I thought I’d ask just in case I’m missing something.
>
I think your missing something.
Is it one field in the hstore? Did you try an expression index?
create index cars_mph on cars ( (data->'mph') );
thats a btree index, which should support < and >. (Although I've never
tried it)
-Andy
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David G Johnston | 2014-11-13 23:01:38 | Re: hstore, but with fast range comparisons? |
| Previous Message | Jonathan Vanasco | 2014-11-13 22:17:26 | Re: Are there any downsides to using postgres' data directory on a dedicated drive/partition / filesystem? |