1996-08-27 23:50:29 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
1999-02-14 00:22:53 +01:00
|
|
|
* skey.h
|
1997-09-07 07:04:48 +02:00
|
|
|
* POSTGRES scan key definitions.
|
1996-08-27 23:50:29 +02:00
|
|
|
*
|
|
|
|
*
|
2001-01-24 20:43:33 +01:00
|
|
|
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
2000-01-26 06:58:53 +01:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
1996-08-27 23:50:29 +02:00
|
|
|
*
|
2001-06-01 04:41:36 +02:00
|
|
|
* $Id: skey.h,v 1.15 2001/06/01 02:41:36 tgl Exp $
|
1996-08-27 23:50:29 +02:00
|
|
|
*
|
|
|
|
*
|
|
|
|
* Note:
|
1997-09-07 07:04:48 +02:00
|
|
|
* Needs more accessor/assignment routines.
|
1996-08-27 23:50:29 +02:00
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
1997-09-07 07:04:48 +02:00
|
|
|
#ifndef SKEY_H
|
1996-08-27 23:50:29 +02:00
|
|
|
#define SKEY_H
|
|
|
|
|
1999-07-16 01:04:24 +02:00
|
|
|
#include "access/attnum.h"
|
|
|
|
#include "fmgr.h"
|
1996-08-27 23:50:29 +02:00
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
typedef struct ScanKeyData
|
|
|
|
{
|
1997-09-08 04:41:22 +02:00
|
|
|
bits16 sk_flags; /* flags */
|
|
|
|
AttrNumber sk_attno; /* domain number */
|
|
|
|
RegProcedure sk_procedure; /* procedure OID */
|
2001-06-01 04:41:36 +02:00
|
|
|
FmgrInfo sk_func; /* fmgr call info for procedure */
|
1997-09-08 04:41:22 +02:00
|
|
|
Datum sk_argument; /* data to compare */
|
1997-09-08 23:56:23 +02:00
|
|
|
} ScanKeyData;
|
1996-08-27 23:50:29 +02:00
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
typedef ScanKeyData *ScanKey;
|
1996-08-27 23:50:29 +02:00
|
|
|
|
2001-06-01 04:41:36 +02:00
|
|
|
/* ScanKeyData flags */
|
|
|
|
#define SK_ISNULL 0x1 /* sk_argument is NULL */
|
|
|
|
#define SK_UNARY 0x2 /* unary function (currently unsupported) */
|
|
|
|
#define SK_NEGATE 0x4 /* negate function result */
|
|
|
|
#define SK_COMMUTE 0x8 /* commute function (not fully supported) */
|
1996-08-27 23:50:29 +02:00
|
|
|
|
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
#define ScanUnmarked 0x01
|
1996-08-27 23:50:29 +02:00
|
|
|
#define ScanUncheckedPrevious 0x02
|
1997-09-07 07:04:48 +02:00
|
|
|
#define ScanUncheckedNext 0x04
|
1996-08-27 23:50:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* prototypes for functions in access/common/scankey.c
|
|
|
|
*/
|
1997-09-08 04:41:22 +02:00
|
|
|
extern void ScanKeyEntrySetIllegal(ScanKey entry);
|
1998-09-01 06:40:42 +02:00
|
|
|
extern void ScanKeyEntryInitialize(ScanKey entry, bits16 flags,
|
1997-09-07 07:04:48 +02:00
|
|
|
AttrNumber attributeNumber, RegProcedure procedure, Datum argument);
|
1996-08-27 23:50:29 +02:00
|
|
|
|
1998-09-01 06:40:42 +02:00
|
|
|
#endif /* SKEY_H */
|