From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | michael uwe maier <gtrw23(at)web(dot)de> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: custom index |
Date: | 2010-03-02 11:53:28 |
Message-ID: | 1267530808.20134.9723.camel@ebony |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, 2010-03-01 at 14:52 +0100, michael uwe maier wrote:
> i want to develop an index for a special problem.
> The postgres docs shows the necessary bits in
> http://www.postgresql.org/docs/8.4/interactive/indexam.html
> especially paragraph 50.2 "Index Access Method Functions".
>
> Now my question: can i use the (documented) Server Programming
> interface within this functions (e.g. SPI_exec within ambuild)
> or do i need to use other (possibly undocumented) functions.
> Background: The index needs some metadata which can be created
> within "normal" tables. Otherwise this information must be built
> within the index.
Yes. There isn't any other way to pass user-defined metadata to an index
at build time. "Storage parameters" exist, but these aren't user
extensible, yet.
Using SQL within anything other than ambuild would cause the index to be
volatile and likely to be non-useful.
> And as an appendix to my question: Are there any (simple) examples
> for custom indexes ?
Look at hash indexes.
That is somewhat simpler because of the lack of transaction logging.
--
Simon Riggs www.2ndQuadrant.com
From | Date | Subject | |
---|---|---|---|
Next Message | AI Rumman | 2010-03-02 11:57:10 | need a query |
Previous Message | Simon Riggs | 2010-03-02 11:47:27 | Re: Putting index entries to XLog |