@@ -172,9 +172,9 @@ CreateEventTrigger(CreateEventTrigStmt *stmt)
172
172
&& tags != NULL )
173
173
validate_table_rewrite_tags ("tag" , tags );
174
174
else if (strcmp (stmt -> eventname , "login" ) == 0 && tags != NULL )
175
- ereport (ERROR ,
176
- (errcode (ERRCODE_FEATURE_NOT_SUPPORTED ),
177
- errmsg ("Tag filtering is not supported for login event trigger" )));
175
+ ereport (ERROR ,
176
+ (errcode (ERRCODE_FEATURE_NOT_SUPPORTED ),
177
+ errmsg ("Tag filtering is not supported for login event trigger" )));
178
178
179
179
/*
180
180
* Give user a nice error message if an event trigger of the same name
@@ -390,8 +390,8 @@ SetDatatabaseHasLoginEventTriggers(void)
390
390
* Use shared lock to prevent a conflit with EventTriggerOnLogin() trying
391
391
* to reset pg_database.dathasloginevt flag. Note, this lock doesn't
392
392
* effectively blocks database or other objection. It's just custom lock
393
- * tag used to prevent multiple backends changing pg_database.dathasloginevt
394
- * flag.
393
+ * tag used to prevent multiple backends changing
394
+ * pg_database.dathasloginevt flag.
395
395
*/
396
396
LockSharedObject (DatabaseRelationId , MyDatabaseId , 0 , AccessExclusiveLock );
397
397
@@ -899,8 +899,8 @@ EventTriggerOnLogin(void)
899
899
900
900
StartTransactionCommand ();
901
901
runlist = EventTriggerCommonSetup (NULL ,
902
- EVT_Login , "login" ,
903
- & trigdata , false);
902
+ EVT_Login , "login" ,
903
+ & trigdata , false);
904
904
905
905
if (runlist != NIL )
906
906
{
@@ -917,21 +917,22 @@ EventTriggerOnLogin(void)
917
917
918
918
PopActiveSnapshot ();
919
919
}
920
+
920
921
/*
921
- * There is no active login event trigger, but our pg_database.dathasloginevt was set.
922
- * Try to unset this flag. We use the lock to prevent concurrent
923
- * SetDatatabaseHasLoginEventTriggers(), but we don't want to hang the
924
- * connection waiting on the lock. Thus, we are just trying to acquire
925
- * the lock conditionally.
922
+ * There is no active login event trigger, but our
923
+ * pg_database.dathasloginevt was set. Try to unset this flag. We use the
924
+ * lock to prevent concurrent SetDatatabaseHasLoginEventTriggers(), but we
925
+ * don't want to hang the connection waiting on the lock. Thus, we are
926
+ * just trying to acquire the lock conditionally.
926
927
*/
927
928
else if (ConditionalLockSharedObject (DatabaseRelationId , MyDatabaseId ,
928
929
0 , AccessExclusiveLock ))
929
930
{
930
931
/*
931
932
* The lock is held. Now we need to recheck that login event triggers
932
933
* list is still empty. Once the list is empty, we know that even if
933
- * there is a backend, which concurrently inserts/enables login trigger,
934
- * it will update pg_database.dathasloginevt *afterwards*.
934
+ * there is a backend, which concurrently inserts/enables login
935
+ * trigger, it will update pg_database.dathasloginevt *afterwards*.
935
936
*/
936
937
runlist = EventTriggerCommonSetup (NULL ,
937
938
EVT_Login , "login" ,
0 commit comments