~ubuntu-branches/ubuntu/lucid/postgresql-8.4/lucid-proposed

« back to all changes in this revision

Viewing changes to contrib/btree_gist/btree_int2.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-07-11 16:59:35 UTC
  • mfrom: (5.1.1 karmic)
  • Revision ID: james.westby@ubuntu.com-20090711165935-jfwin6gfrxf0gfsi
Tags: 8.4.0-2
* debian/libpq-dev.install: Ship catalog/genbki.h. (Closes: #536139)
* debian/rules: Drop --enable-cassert for final release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * $PostgreSQL: pgsql/contrib/btree_gist/btree_int2.c,v 1.7 2008/05/17 01:28:19 adunstan Exp $ 
 
2
 * $PostgreSQL: pgsql/contrib/btree_gist/btree_int2.c,v 1.8 2009/06/11 14:48:50 momjian Exp $
3
3
 */
4
4
#include "btree_gist.h"
5
5
#include "btree_utils_num.h"
8
8
{
9
9
        int16           lower;
10
10
        int16           upper;
11
 
}       int16KEY;
 
11
} int16KEY;
12
12
 
13
13
/*
14
14
** int16 ops
104
104
        GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
105
105
        int16           query = PG_GETARG_INT16(1);
106
106
        StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
 
107
 
107
108
        /* Oid          subtype = PG_GETARG_OID(3); */
108
109
        bool       *recheck = (bool *) PG_GETARG_POINTER(4);
109
110
        int16KEY   *kkk = (int16KEY *) DatumGetPointer(entry->key);
112
113
        /* All cases served by this function are exact */
113
114
        *recheck = false;
114
115
 
115
 
        key.lower = (GBT_NUMKEY *) & kkk->lower;
116
 
        key.upper = (GBT_NUMKEY *) & kkk->upper;
 
116
        key.lower = (GBT_NUMKEY *) &kkk->lower;
 
117
        key.upper = (GBT_NUMKEY *) &kkk->upper;
117
118
 
118
119
        PG_RETURN_BOOL(
119
120
                                   gbt_num_consistent(&key, (void *) &query, &strategy, GIST_LEAF(entry), &tinfo)