What Index Access Method Functions are really needed?

Started by Yves Weißigover 14 years ago5 messages
#1Yves Weißig
weissig@rbg.informatik.tu-darmstadt.de

Hi,

another question regarding indexes. Sadly I can't find enough info in
the documentation. Which of the functions are needed in order for a
index to work? I am developing a prototype so it would be great if not
all of the functions have to be implemented. E.g. are amcostestimate or
amoptions needed?

Greets, Yves

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Yves Weißig (#1)
Re: What Index Access Method Functions are really needed?

=?ISO-8859-15?Q?Yves_Wei=DFig?= <weissig@rbg.informatik.tu-darmstadt.de> writes:

another question regarding indexes. Sadly I can't find enough info in
the documentation. Which of the functions are needed in order for a
index to work?

All of them.

regards, tom lane

#3Leonardo Francalanci
m_lists@yahoo.it
In reply to: Tom Lane (#2)
Re: What Index Access Method Functions are really needed?

another question regarding indexes. Sadly I can't find enough info in
the documentation. Which of the functions are needed in order for a
index to work?

All of them.

Maybe I completely misunderstood the question, but some functions
are "optionals", such as amgetbitmap, right?

http://www.postgresql.org/docs/9.0/static/index-functions.html

#4Kevin Grittner
Kevin.Grittner@wicourts.gov
In reply to: Leonardo Francalanci (#3)
Re: What Index Access Method Functions are really needed?

Leonardo Francalanci <m_lists@yahoo.it> wrote:

another question regarding indexes. Sadly I can't find enough
info in the documentation. Which of the functions are needed in
order for a index to work?

All of them.

Maybe I completely misunderstood the question, but some functions
are "optionals", such as amgetbitmap, right?

http://www.postgresql.org/docs/9.0/static/index-functions.html

Browsing that page, I think these are the two relevant bits
regarding exceptions to the rule:

| The amgettuple function need only be provided if the access method
| supports "plain" index scans. If it doesn't, the amgettuple field
| in its pg_am row must be set to zero.

| The amgetbitmap function need only be provided if the access
| method supports "bitmap" index scans. If it doesn't, the
| amgetbitmap field in its pg_am row must be set to zero.

I have no idea which of these would be useful for the AM being
discussed.

-Kevin

#5Yves Weißig
weissig@rbg.informatik.tu-darmstadt.de
In reply to: Kevin Grittner (#4)
Re: What Index Access Method Functions are really needed?

That is exactly the point, Kevin, I read the documentation and found out
that "amgettuple" and "amgetbitmap" are optional. I just wondered if
there is more information about this topic?
Additionally, I can not find "amcostestimate" in hash.h or anywhere, or
am I missing something? So "All of them" lacks some exceptions, or?

Am 22.04.2011 17:27, schrieb Kevin Grittner:

Show quoted text

Leonardo Francalanci <m_lists@yahoo.it> wrote:

another question regarding indexes. Sadly I can't find enough
info in the documentation. Which of the functions are needed in
order for a index to work?

All of them.

Maybe I completely misunderstood the question, but some functions
are "optionals", such as amgetbitmap, right?

http://www.postgresql.org/docs/9.0/static/index-functions.html

Browsing that page, I think these are the two relevant bits
regarding exceptions to the rule:

| The amgettuple function need only be provided if the access method
| supports "plain" index scans. If it doesn't, the amgettuple field
| in its pg_am row must be set to zero.

| The amgetbitmap function need only be provided if the access
| method supports "bitmap" index scans. If it doesn't, the
| amgetbitmap field in its pg_am row must be set to zero.

I have no idea which of these would be useful for the AM being
discussed.

-Kevin