Definition at line 22 of file insert_username.c.
39 elog(
ERROR,
"insert_username: not fired by trigger manager");
42 elog(
ERROR,
"insert_username: must be fired for row");
45 elog(
ERROR,
"insert_username: must be fired before event");
53 elog(
ERROR,
"insert_username: cannot process DELETE events");
65 args = trigger->tgargs;
66 tupdesc = rel->rd_att;
72 (
errcode(ERRCODE_TRIGGERED_ACTION_EXCEPTION),
77 (
errcode(ERRCODE_TRIGGERED_ACTION_EXCEPTION),
78 errmsg(
"attribute \"%s\" of \"%s\" must be type TEXT",
#define CStringGetTextDatum(s)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
HeapTuple heap_modify_tuple_by_cols(HeapTuple tuple, TupleDesc tupleDesc, int nCols, const int *replCols, const Datum *replValues, const bool *replIsnull)
if(TABLE==NULL||TABLE_index==NULL)
void pfree(void *pointer)
char * GetUserNameFromId(Oid roleid, bool noerr)
static Datum PointerGetDatum(const void *X)
char * SPI_getrelname(Relation rel)
int SPI_fnumber(TupleDesc tupdesc, const char *fname)
Oid SPI_gettypeid(TupleDesc tupdesc, int fnumber)
#define TRIGGER_FIRED_BEFORE(event)
#define CALLED_AS_TRIGGER(fcinfo)
#define TRIGGER_FIRED_FOR_ROW(event)
#define TRIGGER_FIRED_BY_INSERT(event)
#define TRIGGER_FIRED_BY_UPDATE(event)
References generate_unaccent_rules::args, attnum, CALLED_AS_TRIGGER, CStringGetTextDatum, elog, ereport, errcode(), errmsg(), ERROR, GetUserId(), GetUserNameFromId(), heap_modify_tuple_by_cols(), if(), newval, pfree(), PointerGetDatum(), relname, SPI_fnumber(), SPI_getrelname(), SPI_gettypeid(), TriggerData::tg_event, TriggerData::tg_newtuple, TriggerData::tg_relation, TriggerData::tg_trigger, TriggerData::tg_trigtuple, Trigger::tgnargs, TRIGGER_FIRED_BEFORE, TRIGGER_FIRED_BY_INSERT, TRIGGER_FIRED_BY_UPDATE, and TRIGGER_FIRED_FOR_ROW.