mirror of
https://github.com/zebrajr/postgres.git
synced 2025-12-06 12:20:15 +01:00
Also performed an initial run through of upgrading our Copyright date to extend to 2005 ... first run here was very simple ... change everything where: grep 1996-2004 && the word 'Copyright' ... scanned through the generated list with 'less' first, and after, to make sure that I only picked up the right entries ...
71 lines
1.5 KiB
C
71 lines
1.5 KiB
C
/*-------------------------------------------------------------------------
|
|
*
|
|
* indexvalid.c
|
|
* index tuple qualification validity checking code
|
|
*
|
|
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
*
|
|
*
|
|
* IDENTIFICATION
|
|
* $PostgreSQL: pgsql/src/backend/access/common/indexvalid.c,v 1.33 2004/12/31 21:59:07 pgsql Exp $
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
|
|
#include "postgres.h"
|
|
|
|
#include "access/iqual.h"
|
|
#include "executor/execdebug.h"
|
|
|
|
/* ----------------------------------------------------------------
|
|
* index scan key qualification code
|
|
* ----------------------------------------------------------------
|
|
*/
|
|
int NIndexTupleProcessed;
|
|
|
|
|
|
/* ----------------
|
|
* index_keytest - does this index tuple satisfy the scan key(s)?
|
|
* ----------------
|
|
*/
|
|
bool
|
|
index_keytest(IndexTuple tuple,
|
|
TupleDesc tupdesc,
|
|
int scanKeySize,
|
|
ScanKey key)
|
|
{
|
|
IncrIndexProcessed();
|
|
|
|
while (scanKeySize > 0)
|
|
{
|
|
Datum datum;
|
|
bool isNull;
|
|
Datum test;
|
|
|
|
datum = index_getattr(tuple,
|
|
key->sk_attno,
|
|
tupdesc,
|
|
&isNull);
|
|
|
|
if (isNull)
|
|
{
|
|
/* XXX eventually should check if SK_ISNULL */
|
|
return false;
|
|
}
|
|
|
|
if (key->sk_flags & SK_ISNULL)
|
|
return false;
|
|
|
|
test = FunctionCall2(&key->sk_func, datum, key->sk_argument);
|
|
|
|
if (!DatumGetBool(test))
|
|
return false;
|
|
|
|
key++;
|
|
scanKeySize--;
|
|
}
|
|
|
|
return true;
|
|
}
|