⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 indexvalid.c

📁 关系型数据库 Postgresql 6.5.2
💻 C
字号:
/*------------------------------------------------------------------------- * * indexvalid.c *	  index tuple qualification validity checking code * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION *	  $Header: /usr/local/cvsroot/pgsql/src/backend/access/common/indexvalid.c,v 1.21.2.1 1999/08/02 05:24:25 scrappy Exp $ * *------------------------------------------------------------------------- */#include "postgres.h"#include "access/iqual.h"#include "executor/execdebug.h"/* ---------------------------------------------------------------- *				  index scan key qualification code * ---------------------------------------------------------------- */int			NIndexTupleProcessed;/* ---------------- *		index_keytest * * old comments *		May eventually combine with other tests (like timeranges)? *		Should have Buffer buffer; as an argument and pass it to amgetattr. * ---------------- */boolindex_keytest(IndexTuple tuple,			  TupleDesc tupdesc,			  int scanKeySize,			  ScanKey key){	bool		isNull;	Datum		datum;	int			test;	IncrIndexProcessed();	while (scanKeySize > 0)	{		datum = index_getattr(tuple,							  key[0].sk_attno,							  tupdesc,							  &isNull);		if (isNull)		{			/* XXX eventually should check if SK_ISNULL */			return false;		}		if (key[0].sk_flags & SK_ISNULL)			return false;		if (key[0].sk_flags & SK_COMMUTE)		{			test = (*(fmgr_faddr(&key[0].sk_func)))				(DatumGetPointer(key[0].sk_argument),				 datum) ? 1 : 0;		}		else		{			test = (*(fmgr_faddr(&key[0].sk_func)))				(datum,				 DatumGetPointer(key[0].sk_argument)) ? 1 : 0;		}		if (!test == !(key[0].sk_flags & SK_NEGATE))			return false;		scanKeySize -= 1;		key++;	}	return true;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -