diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-12-04 01:25:35 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-12-04 01:25:35 +0000 |
commit | 74b8fe1717d7eb6d627fd69fa73843000eb210df (patch) | |
tree | 06b73d7b954cdd216b183c254cc8f3cb733cdf4b | |
parent | 7a4cc54e58b527ef8e569d2096ba7639c70e48b6 (diff) | |
download | postgresql-74b8fe1717d7eb6d627fd69fa73843000eb210df.tar.gz postgresql-74b8fe1717d7eb6d627fd69fa73843000eb210df.zip |
Seems to have been missed in GetPgUserName updates.
-rw-r--r-- | contrib/spi/insert_username.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/spi/insert_username.c b/contrib/spi/insert_username.c index 6bc31444200..3d083bf2f03 100644 --- a/contrib/spi/insert_username.c +++ b/contrib/spi/insert_username.c @@ -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); |