Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 74b8fe1

Browse files
committed
Seems to have been missed in GetPgUserName updates.
1 parent 7a4cc54 commit 74b8fe1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

contrib/spi/insert_username.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include "executor/spi.h" /* this is what you need to work with SPI */
1010
#include "commands/trigger.h" /* -"- and triggers */
11-
#include "miscadmin.h" /* for GetPgUserName() */
11+
#include "miscadmin.h" /* for GetUserName() */
1212

1313
extern Datum insert_username(PG_FUNCTION_ARGS);
1414

@@ -64,7 +64,8 @@ insert_username(PG_FUNCTION_ARGS)
6464
relname, args[0]);
6565

6666
/* create fields containing name */
67-
newval = DirectFunctionCall1(textin, CStringGetDatum(GetPgUserName()));
67+
newval = DirectFunctionCall1(textin,
68+
CStringGetDatum(GetUserName(GetUserId())));
6869

6970
/* construct new tuple */
7071
rettuple = SPI_modifytuple(rel, rettuple, 1, &attnum, &newval, NULL);

0 commit comments

Comments
 (0)