Skip to content

Commit e9718b4

Browse files
committed
Fix code indentation violations in e83d1b0
koel has not reported this one yet, I have just bumped on it while looking at a different patch.
1 parent 01529c7 commit e9718b4

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

src/backend/commands/event_trigger.c

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,9 @@ CreateEventTrigger(CreateEventTrigStmt *stmt)
172172
&& tags != NULL)
173173
validate_table_rewrite_tags("tag", tags);
174174
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")));
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
*/
396396
LockSharedObject(DatabaseRelationId, MyDatabaseId, 0, AccessExclusiveLock);
397397

@@ -899,8 +899,8 @@ EventTriggerOnLogin(void)
899899

900900
StartTransactionCommand();
901901
runlist = EventTriggerCommonSetup(NULL,
902-
EVT_Login, "login",
903-
&trigdata, false);
902+
EVT_Login, "login",
903+
&trigdata, false);
904904

905905
if (runlist != NIL)
906906
{
@@ -917,21 +917,22 @@ EventTriggerOnLogin(void)
917917

918918
PopActiveSnapshot();
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
*/
927928
else if (ConditionalLockSharedObject(DatabaseRelationId, MyDatabaseId,
928929
0, 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
*/
936937
runlist = EventTriggerCommonSetup(NULL,
937938
EVT_Login, "login",

0 commit comments

Comments
 (0)