Re: Ad-hoc table type?

From: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql(at)mohawksoft(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Ad-hoc table type?
Date: 2008-09-29 04:24:48
Message-ID: C9D5FA39-58E8-471C-ABBB-EAD0F1217271@kineticode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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>@&gt;</> 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Oleg Bartunov 2008-09-29 05:04:37 Re: Ad-hoc table type?
Previous Message Andrew Dunstan 2008-09-29 02:58:24 Re: parallel pg_restore - WIP patch