@@ -172,9 +172,9 @@ CreateEventTrigger(CreateEventTrigStmt *stmt)
172172&& tags != NULL )
173173validate_table_rewrite_tags ("tag" ,tags );
174174else 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" )));
178178
179179/*
180180 * Give user a nice error message if an event trigger of the same name
@@ -390,8 +390,8 @@ SetDatatabaseHasLoginEventTriggers(void)
390390 * Use shared lock to prevent a conflit with EventTriggerOnLogin() trying
391391 * to reset pg_database.dathasloginevt flag. Note, this lock doesn't
392392 * 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.
395395 */
396396LockSharedObject (DatabaseRelationId ,MyDatabaseId ,0 ,AccessExclusiveLock );
397397
@@ -899,8 +899,8 @@ EventTriggerOnLogin(void)
899899
900900StartTransactionCommand ();
901901runlist = EventTriggerCommonSetup (NULL ,
902- EVT_Login ,"login" ,
903- & trigdata , false);
902+ EVT_Login ,"login" ,
903+ & trigdata , false);
904904
905905if (runlist != NIL )
906906{
@@ -917,21 +917,22 @@ EventTriggerOnLogin(void)
917917
918918PopActiveSnapshot ();
919919}
920+
920921/*
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.
926927 */
927928else if (ConditionalLockSharedObject (DatabaseRelationId ,MyDatabaseId ,
9289290 ,AccessExclusiveLock ))
929930{
930931/*
931932 * The lock is held. Now we need to recheck that login event triggers
932933 * 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*.
935936 */
936937runlist = EventTriggerCommonSetup (NULL ,
937938EVT_Login ,"login" ,