mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
Clean up some minor problems exposed by further thought about Panon's bug
report on old-style functions invoked by RI triggers. We had a number of other places that were being sloppy about which memory context FmgrInfo subsidiary data will be allocated in. Turns out none of them actually cause a problem in 7.1, but this is for arcane reasons such as the fact that old-style triggers aren't supported anyway. To avoid getting burnt later, I've restructured the trigger support so that we don't keep trigger FmgrInfo structs in relcache memory. Some other related cleanups too: it's not really necessary to call fmgr_info at all while setting up the index support info in relcache entries, because those ScanKeyEntry structs are never used to invoke the functions. This should speed up relcache initialization a tiny bit.
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: skey.h,v 1.14 2001/01/24 19:43:19 momjian Exp $
|
||||
* $Id: skey.h,v 1.15 2001/06/01 02:41:36 tgl Exp $
|
||||
*
|
||||
*
|
||||
* Note:
|
||||
@ -25,18 +25,18 @@ typedef struct ScanKeyData
|
||||
bits16 sk_flags; /* flags */
|
||||
AttrNumber sk_attno; /* domain number */
|
||||
RegProcedure sk_procedure; /* procedure OID */
|
||||
FmgrInfo sk_func;
|
||||
int32 sk_nargs;
|
||||
FmgrInfo sk_func; /* fmgr call info for procedure */
|
||||
Datum sk_argument; /* data to compare */
|
||||
} ScanKeyData;
|
||||
|
||||
typedef ScanKeyData *ScanKey;
|
||||
|
||||
/* 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) */
|
||||
|
||||
#define SK_ISNULL 0x1
|
||||
#define SK_UNARY 0x2
|
||||
#define SK_NEGATE 0x4
|
||||
#define SK_COMMUTE 0x8
|
||||
|
||||
#define ScanUnmarked 0x01
|
||||
#define ScanUncheckedPrevious 0x02
|
||||
|
Reference in New Issue
Block a user