Re: Ad-hoc table type? - Mailing list pgsql-hackers

From David E. Wheeler
Subject Re: Ad-hoc table type?
Date
Msg-id C9D5FA39-58E8-471C-ABBB-EAD0F1217271@kineticode.com
Whole thread Raw
In response to Re: Ad-hoc table type?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Ad-hoc table type?  (tomas@tuxteam.de)
List pgsql-hackers
On Sep 28, 2008, at 17:46, Tom Lane wrote:

> BTW, I think it is (or should be) possible to create an index on
> hstore->'mycol', so at least one of the reasons why you should *need*
> to switch to a "real" database column seems bogus.

The docs say:
  <title>Indexes</title>
  <para>   <type>hstore</> has index support for <literal>@></> and  
<literal>?</>   operators.  You can use either GiST or GIN index types.  For  
example:  </para>  <programlisting>
CREATE INDEX hidx ON testhstore USING GIST(h);

CREATE INDEX hidx ON testhstore USING GIN(h);  </programlisting>

I'm not sure what that means. Can you create normal btree or hash  
indexes on hstore columns? And is the index useful for both `@>` and `? 
`?

Thanks,

David


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: parallel pg_restore - WIP patch
Next
From: Oleg Bartunov
Date:
Subject: Re: Ad-hoc table type?