summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/catalog/catversion.h4
-rw-r--r--src/include/catalog/pg_proc.h28
-rw-r--r--src/include/commands/trigger.h17
-rw-r--r--src/include/commands/user.h4
-rw-r--r--src/include/executor/executor.h4
-rw-r--r--src/include/fmgr.h4
-rw-r--r--src/include/nodes/nodes.h10
-rw-r--r--src/include/utils/builtins.h37
8 files changed, 59 insertions, 49 deletions
diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h
index e8717ddb05..74b712dca9 100644
--- a/src/include/catalog/catversion.h
+++ b/src/include/catalog/catversion.h
@@ -37,7 +37,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: catversion.h,v 1.22 2000/05/28 17:56:16 tgl Exp $
+ * $Id: catversion.h,v 1.23 2000/05/29 01:59:10 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -53,6 +53,6 @@
*/
/* yyyymmddN */
-#define CATALOG_VERSION_NO 200005281
+#define CATALOG_VERSION_NO 200005282
#endif
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index 2a787f1f37..76f52eef69 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_proc.h,v 1.134 2000/05/28 17:56:16 tgl Exp $
+ * $Id: pg_proc.h,v 1.135 2000/05/29 01:59:10 tgl Exp $
*
* NOTES
* The script catalog/genbki.sh reads this file and generates .bki
@@ -2103,7 +2103,7 @@ DESCR("less-than");
DATA(insert OID = 1656 ( lztext_le PGUID 11 f t t t 2 f 16 "1625 1625" 100 0 1 0 lztext_le - ));
DESCR("less-than-or-equal");
-DATA(insert OID = 1689 ( update_pg_pwd PGUID 11 f t f t 0 f 0 "" 100 0 0 100 update_pg_pwd - ));
+DATA(insert OID = 1689 ( update_pg_pwd PGUID 12 f t f t 0 f 0 "" 100 0 0 100 update_pg_pwd - ));
DESCR("update pg_pwd file");
/* Oracle Compatibility Related Functions - By Edmund Mergl <E.Mergl@bawue.de> */
@@ -2163,29 +2163,29 @@ DATA(insert OID = 1643 ( pg_get_indexdef PGUID 11 f t f t 1 f 25 "26" 100 0
DESCR("index description");
/* Generic referential integrity constraint triggers */
-DATA(insert OID = 1644 ( RI_FKey_check_ins PGUID 11 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_check_ins - ));
+DATA(insert OID = 1644 ( RI_FKey_check_ins PGUID 12 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_check_ins - ));
DESCR("referential integrity FOREIGN KEY ... REFERENCES");
-DATA(insert OID = 1645 ( RI_FKey_check_upd PGUID 11 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_check_upd - ));
+DATA(insert OID = 1645 ( RI_FKey_check_upd PGUID 12 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_check_upd - ));
DESCR("referential integrity FOREIGN KEY ... REFERENCES");
-DATA(insert OID = 1646 ( RI_FKey_cascade_del PGUID 11 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_cascade_del - ));
+DATA(insert OID = 1646 ( RI_FKey_cascade_del PGUID 12 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_cascade_del - ));
DESCR("referential integrity ON DELETE CASCADE");
-DATA(insert OID = 1647 ( RI_FKey_cascade_upd PGUID 11 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_cascade_upd - ));
+DATA(insert OID = 1647 ( RI_FKey_cascade_upd PGUID 12 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_cascade_upd - ));
DESCR("referential integrity ON UPDATE CASCADE");
-DATA(insert OID = 1648 ( RI_FKey_restrict_del PGUID 11 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_restrict_del - ));
+DATA(insert OID = 1648 ( RI_FKey_restrict_del PGUID 12 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_restrict_del - ));
DESCR("referential integrity ON DELETE RESTRICT");
-DATA(insert OID = 1649 ( RI_FKey_restrict_upd PGUID 11 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_restrict_upd - ));
+DATA(insert OID = 1649 ( RI_FKey_restrict_upd PGUID 12 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_restrict_upd - ));
DESCR("referential integrity ON UPDATE RESTRICT");
-DATA(insert OID = 1650 ( RI_FKey_setnull_del PGUID 11 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_setnull_del - ));
+DATA(insert OID = 1650 ( RI_FKey_setnull_del PGUID 12 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_setnull_del - ));
DESCR("referential integrity ON DELETE SET NULL");
-DATA(insert OID = 1651 ( RI_FKey_setnull_upd PGUID 11 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_setnull_upd - ));
+DATA(insert OID = 1651 ( RI_FKey_setnull_upd PGUID 12 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_setnull_upd - ));
DESCR("referential integrity ON UPDATE SET NULL");
-DATA(insert OID = 1652 ( RI_FKey_setdefault_del PGUID 11 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_setdefault_del - ));
+DATA(insert OID = 1652 ( RI_FKey_setdefault_del PGUID 12 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_setdefault_del - ));
DESCR("referential integrity ON DELETE SET DEFAULT");
-DATA(insert OID = 1653 ( RI_FKey_setdefault_upd PGUID 11 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_setdefault_upd - ));
+DATA(insert OID = 1653 ( RI_FKey_setdefault_upd PGUID 12 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_setdefault_upd - ));
DESCR("referential integrity ON UPDATE SET DEFAULT");
-DATA(insert OID = 1654 ( RI_FKey_noaction_del PGUID 11 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_noaction_del - ));
+DATA(insert OID = 1654 ( RI_FKey_noaction_del PGUID 12 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_noaction_del - ));
DESCR("referential integrity ON DELETE NO ACTION");
-DATA(insert OID = 1655 ( RI_FKey_noaction_upd PGUID 11 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_noaction_upd - ));
+DATA(insert OID = 1655 ( RI_FKey_noaction_upd PGUID 12 f t f t 0 f 0 "" 100 0 0 100 RI_FKey_noaction_upd - ));
DESCR("referential integrity ON UPDATE NO ACTION");
DATA(insert OID = 1666 ( varbiteq PGUID 11 f t t t 2 f 16 "1562 1562" 100 0 1 0 varbiteq - ));
diff --git a/src/include/commands/trigger.h b/src/include/commands/trigger.h
index 3b735546ea..c6d5b5413c 100644
--- a/src/include/commands/trigger.h
+++ b/src/include/commands/trigger.h
@@ -1,12 +1,12 @@
/*-------------------------------------------------------------------------
*
* trigger.h
- * prototypes for trigger.c.
+ * Declarations for trigger handling.
*
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: trigger.h,v 1.19 2000/04/12 17:16:32 momjian Exp $
+ * $Id: trigger.h,v 1.20 2000/05/29 01:59:11 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -16,10 +16,19 @@
#include "nodes/execnodes.h"
#include "nodes/parsenodes.h"
+/*
+ * TriggerData is the node type that is passed as fmgr "context" info
+ * when a function is called by the trigger manager.
+ */
+
+#define CALLED_AS_TRIGGER(fcinfo) \
+ ((fcinfo)->context != NULL && IsA((fcinfo)->context, TriggerData))
+
typedef uint32 TriggerEvent;
typedef struct TriggerData
{
+ NodeTag type;
TriggerEvent tg_event;
Relation tg_relation;
HeapTuple tg_trigtuple;
@@ -27,7 +36,7 @@ typedef struct TriggerData
Trigger *tg_trigger;
} TriggerData;
-extern DLLIMPORT TriggerData *CurrentTriggerData;
+/* TriggerEvent bit flags */
#define TRIGGER_EVENT_INSERT 0x00000000
#define TRIGGER_EVENT_DELETE 0x00000001
@@ -136,6 +145,6 @@ extern void DeferredTriggerSaveEvent(Relation rel, int event,
* in utils/adt/ri_triggers.c
*
*/
-extern bool RI_FKey_keyequal_upd(void);
+extern bool RI_FKey_keyequal_upd(TriggerData *trigdata);
#endif /* TRIGGER_H */
diff --git a/src/include/commands/user.h b/src/include/commands/user.h
index f250a1c3da..d985d72d02 100644
--- a/src/include/commands/user.h
+++ b/src/include/commands/user.h
@@ -3,7 +3,7 @@
* user.h
*
*
- *
+ * $Id: user.h,v 1.12 2000/05/29 01:59:11 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -21,6 +21,6 @@ extern void CreateGroup(CreateGroupStmt *stmt);
extern void AlterGroup(AlterGroupStmt *stmt, const char *tag);
extern void DropGroup(DropGroupStmt *stmt);
-extern HeapTuple update_pg_pwd(void);
+extern Datum update_pg_pwd(PG_FUNCTION_ARGS);
#endif /* USER_H */
diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h
index bed2c57ec5..3c85762dfa 100644
--- a/src/include/executor/executor.h
+++ b/src/include/executor/executor.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: executor.h,v 1.42 2000/01/26 05:58:05 momjian Exp $
+ * $Id: executor.h,v 1.43 2000/05/29 01:59:11 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -59,6 +59,8 @@ extern TupleTableSlot *ExecutorRun(QueryDesc *queryDesc, EState *estate,
extern void ExecutorEnd(QueryDesc *queryDesc, EState *estate);
extern void ExecConstraints(char *caller, Relation rel, HeapTuple tuple,
EState *estate);
+extern TupleTableSlot *EvalPlanQual(EState *estate, Index rti,
+ ItemPointer tid);
/*
* prototypes from functions in execProcnode.c
diff --git a/src/include/fmgr.h b/src/include/fmgr.h
index 18b01f7fad..ce6b06bf8d 100644
--- a/src/include/fmgr.h
+++ b/src/include/fmgr.h
@@ -11,7 +11,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: fmgr.h,v 1.1 2000/05/28 17:56:12 tgl Exp $
+ * $Id: fmgr.h,v 1.2 2000/05/29 01:59:09 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -107,6 +107,7 @@ extern void fmgr_info(Oid functionId, FmgrInfo *finfo);
#define PG_GETARG_BOOL(n) DatumGetBool(fcinfo->arg[n])
#define PG_GETARG_OID(n) DatumGetObjectId(fcinfo->arg[n])
#define PG_GETARG_POINTER(n) DatumGetPointer(fcinfo->arg[n])
+#define PG_GETARG_NAME(n) DatumGetName(fcinfo->arg[n])
/* these macros hide the pass-by-reference-ness of the datatype: */
#define PG_GETARG_FLOAT4(n) DatumGetFloat4(fcinfo->arg[n])
#define PG_GETARG_FLOAT8(n) DatumGetFloat8(fcinfo->arg[n])
@@ -133,6 +134,7 @@ extern void fmgr_info(Oid functionId, FmgrInfo *finfo);
#define PG_RETURN_BOOL(x) return BoolGetDatum(x)
#define PG_RETURN_OID(x) return ObjectIdGetDatum(x)
#define PG_RETURN_POINTER(x) return PointerGetDatum(x)
+#define PG_RETURN_NAME(x) return NameGetDatum(x)
/* these macros hide the pass-by-reference-ness of the datatype: */
#define PG_RETURN_FLOAT4(x) return Float4GetDatum(x)
#define PG_RETURN_FLOAT8(x) return Float8GetDatum(x)
diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h
index a8fe032ba5..5d049dadfb 100644
--- a/src/include/nodes/nodes.h
+++ b/src/include/nodes/nodes.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodes.h,v 1.67 2000/04/12 17:16:40 momjian Exp $
+ * $Id: nodes.h,v 1.68 2000/05/29 01:59:12 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -223,7 +223,13 @@ typedef enum NodeTag
T_CaseExpr,
T_CaseWhen,
T_RowMark,
- T_FkConstraint
+ T_FkConstraint,
+
+ /*---------------------
+ * TAGS FOR FUNCTION-CALL CONTEXT AND RESULTINFO NODES (cf. fmgr.h)
+ *---------------------
+ */
+ T_TriggerData = 800 /* in commands/trigger.h */
} NodeTag;
/*
diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h
index 16bff65054..051a155a83 100644
--- a/src/include/utils/builtins.h
+++ b/src/include/utils/builtins.h
@@ -7,23 +7,14 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: builtins.h,v 1.111 2000/04/16 04:41:03 tgl Exp $
- *
- * NOTES
- * This should normally only be included by fmgr.h.
- * Under no circumstances should it ever be included before
- * including fmgr.h!
- * fmgr.h does not seem to include this file, so don't know where this
- * comment came from. Backend code must include this stuff explicitly
- * as far as I can tell...
- * - thomas 1998-06-08
+ * $Id: builtins.h,v 1.112 2000/05/29 01:59:13 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef BUILTINS_H
#define BUILTINS_H
-#include "access/heapam.h" /* for HeapTuple */
+#include "fmgr.h"
#include "nodes/relation.h" /* for amcostestimate parameters */
#include "storage/itemptr.h"
#include "utils/array.h"
@@ -648,17 +639,17 @@ bool lztext_lt(lztext *lz1, lztext *lz2);
bool lztext_le(lztext *lz1, lztext *lz2);
/* ri_triggers.c */
-extern HeapTuple RI_FKey_check_ins(FmgrInfo *proinfo);
-extern HeapTuple RI_FKey_check_upd(FmgrInfo *proinfo);
-extern HeapTuple RI_FKey_noaction_del(FmgrInfo *proinfo);
-extern HeapTuple RI_FKey_noaction_upd(FmgrInfo *proinfo);
-extern HeapTuple RI_FKey_cascade_del(FmgrInfo *proinfo);
-extern HeapTuple RI_FKey_cascade_upd(FmgrInfo *proinfo);
-extern HeapTuple RI_FKey_restrict_del(FmgrInfo *proinfo);
-extern HeapTuple RI_FKey_restrict_upd(FmgrInfo *proinfo);
-extern HeapTuple RI_FKey_setnull_del(FmgrInfo *proinfo);
-extern HeapTuple RI_FKey_setnull_upd(FmgrInfo *proinfo);
-extern HeapTuple RI_FKey_setdefault_del(FmgrInfo *proinfo);
-extern HeapTuple RI_FKey_setdefault_upd(FmgrInfo *proinfo);
+extern Datum RI_FKey_check_ins(PG_FUNCTION_ARGS);
+extern Datum RI_FKey_check_upd(PG_FUNCTION_ARGS);
+extern Datum RI_FKey_noaction_del(PG_FUNCTION_ARGS);
+extern Datum RI_FKey_noaction_upd(PG_FUNCTION_ARGS);
+extern Datum RI_FKey_cascade_del(PG_FUNCTION_ARGS);
+extern Datum RI_FKey_cascade_upd(PG_FUNCTION_ARGS);
+extern Datum RI_FKey_restrict_del(PG_FUNCTION_ARGS);
+extern Datum RI_FKey_restrict_upd(PG_FUNCTION_ARGS);
+extern Datum RI_FKey_setnull_del(PG_FUNCTION_ARGS);
+extern Datum RI_FKey_setnull_upd(PG_FUNCTION_ARGS);
+extern Datum RI_FKey_setdefault_del(PG_FUNCTION_ARGS);
+extern Datum RI_FKey_setdefault_upd(PG_FUNCTION_ARGS);
#endif /* BUILTINS_H */