]> granicus.if.org Git - postgresql/commitdiff
Seems to have been missed in GetPgUserName updates.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 4 Dec 2000 01:25:35 +0000 (01:25 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 4 Dec 2000 01:25:35 +0000 (01:25 +0000)
contrib/spi/insert_username.c

index 6bc31444200332ca913bb50c7a21c7f62d85ec2a..3d083bf2f035b800be86c4c3d25dca9bd3392250 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "executor/spi.h"              /* this is what you need to work with SPI */
 #include "commands/trigger.h"  /* -"- and triggers */
-#include "miscadmin.h"                 /* for GetPgUserName() */
+#include "miscadmin.h"                 /* for GetUserName() */
 
 extern Datum   insert_username(PG_FUNCTION_ARGS);
 
@@ -64,7 +64,8 @@ insert_username(PG_FUNCTION_ARGS)
                         relname, args[0]);
 
        /* create fields containing name */
-       newval = DirectFunctionCall1(textin, CStringGetDatum(GetPgUserName()));
+       newval = DirectFunctionCall1(textin,
+                                                                CStringGetDatum(GetUserName(GetUserId())));
 
        /* construct new tuple */
        rettuple = SPI_modifytuple(rel, rettuple, 1, &attnum, &newval, NULL);