mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
pgindent run.
This commit is contained in:
@ -65,17 +65,17 @@ insert_username(PG_FUNCTION_ARGS)
|
||||
if (attnum < 0)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_TRIGGERED_ACTION_EXCEPTION),
|
||||
errmsg("\"%s\" has no attribute \"%s\"", relname, args[0])));
|
||||
errmsg("\"%s\" has no attribute \"%s\"", relname, args[0])));
|
||||
|
||||
if (SPI_gettypeid(tupdesc, attnum) != TEXTOID)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_TRIGGERED_ACTION_EXCEPTION),
|
||||
errmsg("attribute \"%s\" of \"%s\" must be type TEXT",
|
||||
args[0], relname)));
|
||||
args[0], relname)));
|
||||
|
||||
/* create fields containing name */
|
||||
newval = DirectFunctionCall1(textin,
|
||||
CStringGetDatum(GetUserNameFromId(GetUserId())));
|
||||
CStringGetDatum(GetUserNameFromId(GetUserId())));
|
||||
|
||||
/* construct new tuple */
|
||||
rettuple = SPI_modifytuple(rel, rettuple, 1, &attnum, &newval, NULL);
|
||||
|
Reference in New Issue
Block a user