~ubuntu-branches/ubuntu/natty/postgresql-8.4/natty-security

« back to all changes in this revision

Viewing changes to contrib/btree_gist/btree_interval.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-07-01 17:41:41 UTC
  • mfrom: (1.1.4 upstream)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20090701174141-jfmn9tt8e69m950x
Tags: 8.4.0-1
* Final 8.4.0 release. Major enhancements:
  - Windowing Functions
  - Common Table Expressions and Recursive Queries
  - Default and variadic parameters for functions
  - Parallel Restore
  - Column Permissions
  - Per-database locale settings
  - Improved hash indexes
  - Improved join performance for EXISTS and NOT EXISTS queries
  - Easier-to-use Warm Standby
  - Automatic sizing of the Free Space Map
  - Visibility Map (greatly reduces vacuum overhead for slowly-changing
    tables)
  - Version-aware psql (backslash commands work against older servers)
  - Support SSL certificates for user authentication
  - Per-function runtime statistics
  - Easy editing of functions in psql
  - New contrib modules: pg_stat_statements, auto_explain, citext,
    btree_gin 
  Upload to unstable, 8.4 is the new default. 
* debian/control: Build the versionless metapackages and have them point to
  8.4.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * $PostgreSQL: pgsql/contrib/btree_gist/btree_interval.c,v 1.11 2008/05/17 01:28:19 adunstan Exp $ 
 
2
 * $PostgreSQL: pgsql/contrib/btree_gist/btree_interval.c,v 1.12 2009/06/11 14:48:50 momjian Exp $
3
3
 */
4
4
#include "btree_gist.h"
5
5
#include "btree_utils_num.h"
9
9
{
10
10
        Interval        lower,
11
11
                                upper;
12
 
}       intvKEY;
 
12
} intvKEY;
13
13
 
14
14
 
15
15
/*
169
169
        GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
170
170
        Interval   *query = PG_GETARG_INTERVAL_P(1);
171
171
        StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
 
172
 
172
173
        /* Oid          subtype = PG_GETARG_OID(3); */
173
174
        bool       *recheck = (bool *) PG_GETARG_POINTER(4);
174
175
        intvKEY    *kkk = (intvKEY *) DatumGetPointer(entry->key);
177
178
        /* All cases served by this function are exact */
178
179
        *recheck = false;
179
180
 
180
 
        key.lower = (GBT_NUMKEY *) & kkk->lower;
181
 
        key.upper = (GBT_NUMKEY *) & kkk->upper;
 
181
        key.lower = (GBT_NUMKEY *) &kkk->lower;
 
182
        key.upper = (GBT_NUMKEY *) &kkk->upper;
182
183
 
183
184
        PG_RETURN_BOOL(
184
185
                                   gbt_num_consistent(&key, (void *) query, &strategy, GIST_LEAF(entry), &tinfo)