diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/catalog/catversion.h | 2 | ||||
| -rw-r--r-- | src/include/catalog/pg_database.dat | 2 | ||||
| -rw-r--r-- | src/include/catalog/pg_database.h | 3 | ||||
| -rw-r--r-- | src/include/commands/event_trigger.h | 1 | ||||
| -rw-r--r-- | src/include/miscadmin.h | 2 | ||||
| -rw-r--r-- | src/include/storage/lmgr.h | 2 | ||||
| -rw-r--r-- | src/include/tcop/cmdtaglist.h | 1 | ||||
| -rw-r--r-- | src/include/utils/evtcache.h | 3 |
8 files changed, 13 insertions, 3 deletions
diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h index 5efc1445207..c5f4af24dc1 100644 --- a/src/include/catalog/catversion.h +++ b/src/include/catalog/catversion.h @@ -57,6 +57,6 @@ */ /* yyyymmddN */ -#define CATALOG_VERSION_NO 202310141 +#define CATALOG_VERSION_NO 202310161 #endif diff --git a/src/include/catalog/pg_database.dat b/src/include/catalog/pg_database.dat index 0754ef1bce4..8d91e3bf8da 100644 --- a/src/include/catalog/pg_database.dat +++ b/src/include/catalog/pg_database.dat @@ -16,7 +16,7 @@ descr => 'default template for new databases', datname => 'template1', encoding => 'ENCODING', datlocprovider => 'LOCALE_PROVIDER', datistemplate => 't', - datallowconn => 't', datconnlimit => '-1', datfrozenxid => '0', + datallowconn => 't', dathasloginevt => 'f', datconnlimit => '-1', datfrozenxid => '0', datminmxid => '1', dattablespace => 'pg_default', datcollate => 'LC_COLLATE', datctype => 'LC_CTYPE', daticulocale => 'ICU_LOCALE', daticurules => 'ICU_RULES', datacl => '_null_' }, diff --git a/src/include/catalog/pg_database.h b/src/include/catalog/pg_database.h index e9eb06b2e53..3e50a570046 100644 --- a/src/include/catalog/pg_database.h +++ b/src/include/catalog/pg_database.h @@ -49,6 +49,9 @@ CATALOG(pg_database,1262,DatabaseRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID /* new connections allowed? */ bool datallowconn; + /* database has login event triggers? */ + bool dathasloginevt; + /* * Max connections allowed. Negative values have special meaning, see * DATCONNLIMIT_* defines below. diff --git a/src/include/commands/event_trigger.h b/src/include/commands/event_trigger.h index 1c925dbf257..9e3ece50d5f 100644 --- a/src/include/commands/event_trigger.h +++ b/src/include/commands/event_trigger.h @@ -56,6 +56,7 @@ extern void EventTriggerDDLCommandStart(Node *parsetree); extern void EventTriggerDDLCommandEnd(Node *parsetree); extern void EventTriggerSQLDrop(Node *parsetree); extern void EventTriggerTableRewrite(Node *parsetree, Oid tableOid, int reason); +extern void EventTriggerOnLogin(void); extern bool EventTriggerBeginCompleteQuery(void); extern void EventTriggerEndCompleteQuery(void); diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h index c2f9de63a13..7232b03e379 100644 --- a/src/include/miscadmin.h +++ b/src/include/miscadmin.h @@ -203,6 +203,8 @@ extern PGDLLIMPORT Oid MyDatabaseId; extern PGDLLIMPORT Oid MyDatabaseTableSpace; +extern PGDLLIMPORT bool MyDatabaseHasLoginEventTriggers; + /* * Date/Time Configuration * diff --git a/src/include/storage/lmgr.h b/src/include/storage/lmgr.h index 4ee91e3cf93..952ebe75cb4 100644 --- a/src/include/storage/lmgr.h +++ b/src/include/storage/lmgr.h @@ -99,6 +99,8 @@ extern void UnlockDatabaseObject(Oid classid, Oid objid, uint16 objsubid, /* Lock a shared-across-databases object (other than a relation) */ extern void LockSharedObject(Oid classid, Oid objid, uint16 objsubid, LOCKMODE lockmode); +extern bool ConditionalLockSharedObject(Oid classid, Oid objid, uint16 objsubid, + LOCKMODE lockmode); extern void UnlockSharedObject(Oid classid, Oid objid, uint16 objsubid, LOCKMODE lockmode); diff --git a/src/include/tcop/cmdtaglist.h b/src/include/tcop/cmdtaglist.h index e738ac1c097..553a31874f1 100644 --- a/src/include/tcop/cmdtaglist.h +++ b/src/include/tcop/cmdtaglist.h @@ -186,6 +186,7 @@ PG_CMDTAG(CMDTAG_INSERT, "INSERT", false, false, true) PG_CMDTAG(CMDTAG_LISTEN, "LISTEN", false, false, false) PG_CMDTAG(CMDTAG_LOAD, "LOAD", false, false, false) PG_CMDTAG(CMDTAG_LOCK_TABLE, "LOCK TABLE", false, false, false) +PG_CMDTAG(CMDTAG_LOGIN, "LOGIN", true, false, false) PG_CMDTAG(CMDTAG_MERGE, "MERGE", false, false, true) PG_CMDTAG(CMDTAG_MOVE, "MOVE", false, false, true) PG_CMDTAG(CMDTAG_NOTIFY, "NOTIFY", false, false, false) diff --git a/src/include/utils/evtcache.h b/src/include/utils/evtcache.h index d340026518a..52052e6252a 100644 --- a/src/include/utils/evtcache.h +++ b/src/include/utils/evtcache.h @@ -22,7 +22,8 @@ typedef enum EVT_DDLCommandStart, EVT_DDLCommandEnd, EVT_SQLDrop, - EVT_TableRewrite + EVT_TableRewrite, + EVT_Login, } EventTriggerEvent; typedef struct |
