1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>49.3.Implementation</title>
<link rel="stylesheet" href="stylesheet.css" type="text/css">
<link rev="made" href="pgsql-docs@postgresql.org">
<meta name="generator" content="DocBook XSL Stylesheets V1.70.0">
<link rel="start" href="index.html" title="PostgreSQL 8.1.4 Documentation">
<link rel="up" href="gist.html" title="Chapter49.GiST Indexes">
<link rel="prev" href="gist-extensibility.html" title="49.2.Extensibility">
<link rel="next" href="gist-examples.html" title="49.4.Examples">
<link rel="copyright" href="ln-legalnotice.html" title="Legal Notice">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="gist-implementation"></a>49.3.Implementation</h2></div></div></div>
<p> There are seven methods that an index operator class for
<acronym class="acronym">GiST</acronym> must provide:
</p>
<div class="variablelist"><dl>
<dt><span class="term">consistent</span></dt>
<dd><p> Given a predicate <code class="literal">p</code> on a tree page, and a user
query, <code class="literal">q</code>, this method will return false if it is
certain that both <code class="literal">p</code> and <code class="literal">q</code> cannot
be true for a given data item.
</p></dd>
<dt><span class="term">union</span></dt>
<dd><p> This method consolidates information in the tree. Given a set of
entries, this function generates a new predicate that is true for all
the entries.
</p></dd>
<dt><span class="term">compress</span></dt>
<dd><p> Converts the data item into a format suitable for physical storage in
an index page.
</p></dd>
<dt><span class="term">decompress</span></dt>
<dd><p> The reverse of the <code class="function">compress</code> method. Converts the
index representation of the data item into a format that can be
manipulated by the database.
</p></dd>
<dt><span class="term">penalty</span></dt>
<dd><p> Returns a value indicating the “<span class="quote">cost</span>” of inserting the new
entry into a particular branch of the tree. items will be inserted
down the path of least <code class="function">penalty</code> in the tree.
</p></dd>
<dt><span class="term">picksplit</span></dt>
<dd><p> When a page split is necessary, this function decides which entries on
the page are to stay on the old page, and which are to move to the new
page.
</p></dd>
<dt><span class="term">same</span></dt>
<dd><p> Returns true if two entries are identical, false otherwise.
</p></dd>
</dl></div>
</div></body>
</html>
|