PostgreSQL Source Code
git master
|
#include "postgres.h"
#include <ctype.h>
#include "commands/trigger.h"
#include "executor/spi.h"
#include "utils/builtins.h"
#include "utils/memutils.h"
#include "utils/rel.h"
Go to the source code of this file.
Data Structures | |
struct | EPlan |
Functions | |
static EPlan * | find_plan (char *ident, EPlan **eplan, int *nplans) |
PG_FUNCTION_INFO_V1 (check_primary_key) | |
Datum | check_primary_key (PG_FUNCTION_ARGS) |
PG_FUNCTION_INFO_V1 (check_foreign_key) | |
Datum | check_foreign_key (PG_FUNCTION_ARGS) |
Variables | |
PG_MODULE_MAGIC | |
static EPlan * | FPlans = NULL |
static int | nFPlans = 0 |
static EPlan * | PPlans = NULL |
static int | nPPlans = 0 |
Datum check_foreign_key | ( | PG_FUNCTION_ARGS | ) |
Definition at line 238 of file refint.c.
References generate_unaccent_rules::action, generate_unaccent_rules::args, Assert, CALLED_AS_TRIGGER, DEBUG4, elog, ereport, errcode(), errmsg(), ERROR, find_plan(), fn(), FPlans, i, ident, MemoryContextAlloc(), NAMEDATALEN, newval, nFPlans, NOTICE, palloc(), pg_strtoint32(), plan, PointerGetDatum(), RelationData::rd_att, relname, snprintf, SPI_connect(), SPI_execp(), SPI_finish(), SPI_fnumber(), SPI_getbinval(), SPI_getrelname(), SPI_gettype(), SPI_gettypeid(), SPI_getvalue(), SPI_keepplan(), SPI_prepare(), SPI_processed, SPI_result, SPI_result_code_string(), TriggerData::tg_event, TriggerData::tg_newtuple, TriggerData::tg_relation, TriggerData::tg_trigger, TriggerData::tg_trigtuple, Trigger::tgnargs, TopMemoryContext, TRIGGER_FIRED_BY_INSERT, TRIGGER_FIRED_BY_UPDATE, TRIGGER_FIRED_FOR_ROW, type, and UINT64_FORMAT.
Datum check_primary_key | ( | PG_FUNCTION_ARGS | ) |
Definition at line 47 of file refint.c.
References generate_unaccent_rules::args, CALLED_AS_TRIGGER, DEBUG4, elog, ereport, errcode(), errdetail(), errmsg(), ERROR, find_plan(), i, ident, if(), MemoryContextAlloc(), NAMEDATALEN, nPPlans, palloc(), plan, PointerGetDatum(), PPlans, RelationData::rd_att, relname, snprintf, SPI_connect(), SPI_execp(), SPI_finish(), SPI_fnumber(), SPI_getbinval(), SPI_getrelname(), SPI_gettypeid(), SPI_keepplan(), SPI_prepare(), SPI_processed, SPI_result, SPI_result_code_string(), TriggerData::tg_event, TriggerData::tg_newtuple, TriggerData::tg_relation, TriggerData::tg_trigger, TriggerData::tg_trigtuple, Trigger::tgnargs, TopMemoryContext, TRIGGER_FIRED_BY_DELETE, TRIGGER_FIRED_BY_INSERT, and TRIGGER_FIRED_FOR_ROW.
Definition at line 610 of file refint.c.
References i, EPlan::ident, ident, MemoryContextSwitchTo(), EPlan::nplans, palloc(), pstrdup(), repalloc(), EPlan::splan, and TopMemoryContext.
Referenced by check_foreign_key(), and check_primary_key().
PG_FUNCTION_INFO_V1 | ( | check_foreign_key | ) |
PG_FUNCTION_INFO_V1 | ( | check_primary_key | ) |
|
static |
Definition at line 27 of file refint.c.
Referenced by check_foreign_key().
|
static |
Definition at line 28 of file refint.c.
Referenced by check_foreign_key().
|
static |
Definition at line 30 of file refint.c.
Referenced by check_primary_key().
|
static |
Definition at line 29 of file refint.c.
Referenced by check_primary_key().