mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +03:00
Phase 2 pgindent run for v12.
Switch to 2.1 version of pg_bsd_indent. This formats multiline function declarations "correctly", that is with additional lines of parameter declarations indented to match where the first line's left parenthesis is. Discussion: https://postgr.es/m/CAEepm=0P3FeTXRcU5B2W3jv3PgRVZ-kGUXLGfd42FFhUROO3ug@mail.gmail.com
This commit is contained in:
@ -85,24 +85,24 @@ static BufferAccessStrategy vac_strategy;
|
||||
|
||||
|
||||
static void do_analyze_rel(Relation onerel,
|
||||
VacuumParams *params, List *va_cols,
|
||||
AcquireSampleRowsFunc acquirefunc, BlockNumber relpages,
|
||||
bool inh, bool in_outer_xact, int elevel);
|
||||
VacuumParams *params, List *va_cols,
|
||||
AcquireSampleRowsFunc acquirefunc, BlockNumber relpages,
|
||||
bool inh, bool in_outer_xact, int elevel);
|
||||
static void compute_index_stats(Relation onerel, double totalrows,
|
||||
AnlIndexData *indexdata, int nindexes,
|
||||
HeapTuple *rows, int numrows,
|
||||
MemoryContext col_context);
|
||||
AnlIndexData *indexdata, int nindexes,
|
||||
HeapTuple *rows, int numrows,
|
||||
MemoryContext col_context);
|
||||
static VacAttrStats *examine_attribute(Relation onerel, int attnum,
|
||||
Node *index_expr);
|
||||
static int acquire_sample_rows(Relation onerel, int elevel,
|
||||
HeapTuple *rows, int targrows,
|
||||
double *totalrows, double *totaldeadrows);
|
||||
Node *index_expr);
|
||||
static int acquire_sample_rows(Relation onerel, int elevel,
|
||||
HeapTuple *rows, int targrows,
|
||||
double *totalrows, double *totaldeadrows);
|
||||
static int compare_rows(const void *a, const void *b);
|
||||
static int acquire_inherited_sample_rows(Relation onerel, int elevel,
|
||||
HeapTuple *rows, int targrows,
|
||||
double *totalrows, double *totaldeadrows);
|
||||
static int acquire_inherited_sample_rows(Relation onerel, int elevel,
|
||||
HeapTuple *rows, int targrows,
|
||||
double *totalrows, double *totaldeadrows);
|
||||
static void update_attstats(Oid relid, bool inh,
|
||||
int natts, VacAttrStats **vacattrstats);
|
||||
int natts, VacAttrStats **vacattrstats);
|
||||
static Datum std_fetch_func(VacAttrStatsP stats, int rownum, bool *isNull);
|
||||
static Datum ind_fetch_func(VacAttrStatsP stats, int rownum, bool *isNull);
|
||||
|
||||
@ -1615,25 +1615,25 @@ typedef struct
|
||||
|
||||
|
||||
static void compute_trivial_stats(VacAttrStatsP stats,
|
||||
AnalyzeAttrFetchFunc fetchfunc,
|
||||
int samplerows,
|
||||
double totalrows);
|
||||
AnalyzeAttrFetchFunc fetchfunc,
|
||||
int samplerows,
|
||||
double totalrows);
|
||||
static void compute_distinct_stats(VacAttrStatsP stats,
|
||||
AnalyzeAttrFetchFunc fetchfunc,
|
||||
int samplerows,
|
||||
double totalrows);
|
||||
AnalyzeAttrFetchFunc fetchfunc,
|
||||
int samplerows,
|
||||
double totalrows);
|
||||
static void compute_scalar_stats(VacAttrStatsP stats,
|
||||
AnalyzeAttrFetchFunc fetchfunc,
|
||||
int samplerows,
|
||||
double totalrows);
|
||||
AnalyzeAttrFetchFunc fetchfunc,
|
||||
int samplerows,
|
||||
double totalrows);
|
||||
static int compare_scalars(const void *a, const void *b, void *arg);
|
||||
static int compare_mcvs(const void *a, const void *b);
|
||||
static int analyze_mcv_list(int *mcv_counts,
|
||||
int num_mcv,
|
||||
double stadistinct,
|
||||
double stanullfrac,
|
||||
int samplerows,
|
||||
double totalrows);
|
||||
static int analyze_mcv_list(int *mcv_counts,
|
||||
int num_mcv,
|
||||
double stadistinct,
|
||||
double stanullfrac,
|
||||
int samplerows,
|
||||
double totalrows);
|
||||
|
||||
|
||||
/*
|
||||
|
@ -387,9 +387,9 @@ static void asyncQueueFillWarning(void);
|
||||
static bool SignalBackends(void);
|
||||
static void asyncQueueReadAllNotifications(void);
|
||||
static bool asyncQueueProcessPageEntries(volatile QueuePosition *current,
|
||||
QueuePosition stop,
|
||||
char *page_buffer,
|
||||
Snapshot snapshot);
|
||||
QueuePosition stop,
|
||||
char *page_buffer,
|
||||
Snapshot snapshot);
|
||||
static void asyncQueueAdvanceTail(void);
|
||||
static void ProcessIncomingNotify(void);
|
||||
static bool AsyncExistsPendingNotify(const char *channel, const char *payload);
|
||||
|
@ -70,8 +70,8 @@ typedef struct
|
||||
|
||||
static void rebuild_relation(Relation OldHeap, Oid indexOid, bool verbose);
|
||||
static void copy_table_data(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex,
|
||||
bool verbose, bool *pSwapToastByContent,
|
||||
TransactionId *pFreezeXid, MultiXactId *pCutoffMulti);
|
||||
bool verbose, bool *pSwapToastByContent,
|
||||
TransactionId *pFreezeXid, MultiXactId *pCutoffMulti);
|
||||
static List *get_tables_to_cluster(MemoryContext cluster_context);
|
||||
|
||||
|
||||
|
@ -354,13 +354,13 @@ static const char BinarySignature[11] = "PGCOPY\n\377\r\n\0";
|
||||
|
||||
/* non-export function prototypes */
|
||||
static CopyState BeginCopy(ParseState *pstate, bool is_from, Relation rel,
|
||||
RawStmt *raw_query, Oid queryRelId, List *attnamelist,
|
||||
List *options);
|
||||
RawStmt *raw_query, Oid queryRelId, List *attnamelist,
|
||||
List *options);
|
||||
static void EndCopy(CopyState cstate);
|
||||
static void ClosePipeToProgram(CopyState cstate);
|
||||
static CopyState BeginCopyTo(ParseState *pstate, Relation rel, RawStmt *query,
|
||||
Oid queryRelId, const char *filename, bool is_program,
|
||||
List *attnamelist, List *options);
|
||||
Oid queryRelId, const char *filename, bool is_program,
|
||||
List *attnamelist, List *options);
|
||||
static void EndCopyTo(CopyState cstate);
|
||||
static uint64 DoCopyTo(CopyState cstate);
|
||||
static uint64 CopyTo(CopyState cstate);
|
||||
@ -370,14 +370,14 @@ static bool CopyReadLineText(CopyState cstate);
|
||||
static int CopyReadAttributesText(CopyState cstate);
|
||||
static int CopyReadAttributesCSV(CopyState cstate);
|
||||
static Datum CopyReadBinaryAttribute(CopyState cstate,
|
||||
int column_no, FmgrInfo *flinfo,
|
||||
Oid typioparam, int32 typmod,
|
||||
bool *isnull);
|
||||
int column_no, FmgrInfo *flinfo,
|
||||
Oid typioparam, int32 typmod,
|
||||
bool *isnull);
|
||||
static void CopyAttributeOutText(CopyState cstate, char *string);
|
||||
static void CopyAttributeOutCSV(CopyState cstate, char *string,
|
||||
bool use_quote, bool single_attr);
|
||||
bool use_quote, bool single_attr);
|
||||
static List *CopyGetAttnums(TupleDesc tupDesc, Relation rel,
|
||||
List *attnamelist);
|
||||
List *attnamelist);
|
||||
static char *limit_printout_length(const char *str);
|
||||
|
||||
/* Low-level communications functions */
|
||||
@ -388,8 +388,8 @@ static void CopySendData(CopyState cstate, const void *databuf, int datasize);
|
||||
static void CopySendString(CopyState cstate, const char *str);
|
||||
static void CopySendChar(CopyState cstate, char c);
|
||||
static void CopySendEndOfRow(CopyState cstate);
|
||||
static int CopyGetData(CopyState cstate, void *databuf,
|
||||
int minread, int maxread);
|
||||
static int CopyGetData(CopyState cstate, void *databuf,
|
||||
int minread, int maxread);
|
||||
static void CopySendInt32(CopyState cstate, int32 val);
|
||||
static bool CopyGetInt32(CopyState cstate, int32 *val);
|
||||
static void CopySendInt16(CopyState cstate, int16 val);
|
||||
|
@ -82,11 +82,11 @@ static void createdb_failure_callback(int code, Datum arg);
|
||||
static void movedb(const char *dbname, const char *tblspcname);
|
||||
static void movedb_failure_callback(int code, Datum arg);
|
||||
static bool get_db_info(const char *name, LOCKMODE lockmode,
|
||||
Oid *dbIdP, Oid *ownerIdP,
|
||||
int *encodingP, bool *dbIsTemplateP, bool *dbAllowConnP,
|
||||
Oid *dbLastSysOidP, TransactionId *dbFrozenXidP,
|
||||
MultiXactId *dbMinMultiP,
|
||||
Oid *dbTablespace, char **dbCollate, char **dbCtype);
|
||||
Oid *dbIdP, Oid *ownerIdP,
|
||||
int *encodingP, bool *dbIsTemplateP, bool *dbAllowConnP,
|
||||
Oid *dbLastSysOidP, TransactionId *dbFrozenXidP,
|
||||
MultiXactId *dbMinMultiP,
|
||||
Oid *dbTablespace, char **dbCollate, char **dbCtype);
|
||||
static bool have_createdb_privilege(void);
|
||||
static void remove_dbtablespaces(Oid db_id);
|
||||
static bool check_db_file_conflict(Oid db_id);
|
||||
|
@ -32,13 +32,13 @@
|
||||
|
||||
|
||||
static void does_not_exist_skipping(ObjectType objtype,
|
||||
Node *object);
|
||||
Node *object);
|
||||
static bool owningrel_does_not_exist_skipping(List *object,
|
||||
const char **msg, char **name);
|
||||
const char **msg, char **name);
|
||||
static bool schema_does_not_exist_skipping(List *object,
|
||||
const char **msg, char **name);
|
||||
const char **msg, char **name);
|
||||
static bool type_in_list_does_not_exist_skipping(List *typenames,
|
||||
const char **msg, char **name);
|
||||
const char **msg, char **name);
|
||||
|
||||
|
||||
/*
|
||||
|
@ -148,15 +148,15 @@ typedef struct SQLDropObject
|
||||
} SQLDropObject;
|
||||
|
||||
static void AlterEventTriggerOwner_internal(Relation rel,
|
||||
HeapTuple tup,
|
||||
Oid newOwnerId);
|
||||
HeapTuple tup,
|
||||
Oid newOwnerId);
|
||||
static event_trigger_command_tag_check_result check_ddl_tag(const char *tag);
|
||||
static event_trigger_command_tag_check_result check_table_rewrite_ddl_tag(
|
||||
const char *tag);
|
||||
const char *tag);
|
||||
static void error_duplicate_filter_variable(const char *defname);
|
||||
static Datum filter_list_to_array(List *filterlist);
|
||||
static Oid insert_event_trigger_tuple(const char *trigname, const char *eventname,
|
||||
Oid evtOwner, Oid funcoid, List *tags);
|
||||
static Oid insert_event_trigger_tuple(const char *trigname, const char *eventname,
|
||||
Oid evtOwner, Oid funcoid, List *tags);
|
||||
static void validate_ddl_tags(const char *filtervar, List *taglist);
|
||||
static void validate_table_rewrite_tags(const char *filtervar, List *taglist);
|
||||
static void EventTriggerInvoke(List *fn_oid_list, EventTriggerData *trigdata);
|
||||
|
@ -54,79 +54,79 @@ explain_get_index_name_hook_type explain_get_index_name_hook = NULL;
|
||||
#define X_NOWHITESPACE 4
|
||||
|
||||
static void ExplainOneQuery(Query *query, int cursorOptions,
|
||||
IntoClause *into, ExplainState *es,
|
||||
const char *queryString, ParamListInfo params,
|
||||
QueryEnvironment *queryEnv);
|
||||
IntoClause *into, ExplainState *es,
|
||||
const char *queryString, ParamListInfo params,
|
||||
QueryEnvironment *queryEnv);
|
||||
static void report_triggers(ResultRelInfo *rInfo, bool show_relname,
|
||||
ExplainState *es);
|
||||
ExplainState *es);
|
||||
static double elapsed_time(instr_time *starttime);
|
||||
static bool ExplainPreScanNode(PlanState *planstate, Bitmapset **rels_used);
|
||||
static void ExplainNode(PlanState *planstate, List *ancestors,
|
||||
const char *relationship, const char *plan_name,
|
||||
ExplainState *es);
|
||||
const char *relationship, const char *plan_name,
|
||||
ExplainState *es);
|
||||
static void show_plan_tlist(PlanState *planstate, List *ancestors,
|
||||
ExplainState *es);
|
||||
ExplainState *es);
|
||||
static void show_expression(Node *node, const char *qlabel,
|
||||
PlanState *planstate, List *ancestors,
|
||||
bool useprefix, ExplainState *es);
|
||||
PlanState *planstate, List *ancestors,
|
||||
bool useprefix, ExplainState *es);
|
||||
static void show_qual(List *qual, const char *qlabel,
|
||||
PlanState *planstate, List *ancestors,
|
||||
bool useprefix, ExplainState *es);
|
||||
PlanState *planstate, List *ancestors,
|
||||
bool useprefix, ExplainState *es);
|
||||
static void show_scan_qual(List *qual, const char *qlabel,
|
||||
PlanState *planstate, List *ancestors,
|
||||
ExplainState *es);
|
||||
PlanState *planstate, List *ancestors,
|
||||
ExplainState *es);
|
||||
static void show_upper_qual(List *qual, const char *qlabel,
|
||||
PlanState *planstate, List *ancestors,
|
||||
ExplainState *es);
|
||||
PlanState *planstate, List *ancestors,
|
||||
ExplainState *es);
|
||||
static void show_sort_keys(SortState *sortstate, List *ancestors,
|
||||
ExplainState *es);
|
||||
ExplainState *es);
|
||||
static void show_merge_append_keys(MergeAppendState *mstate, List *ancestors,
|
||||
ExplainState *es);
|
||||
ExplainState *es);
|
||||
static void show_agg_keys(AggState *astate, List *ancestors,
|
||||
ExplainState *es);
|
||||
ExplainState *es);
|
||||
static void show_grouping_sets(PlanState *planstate, Agg *agg,
|
||||
List *ancestors, ExplainState *es);
|
||||
List *ancestors, ExplainState *es);
|
||||
static void show_grouping_set_keys(PlanState *planstate,
|
||||
Agg *aggnode, Sort *sortnode,
|
||||
List *context, bool useprefix,
|
||||
List *ancestors, ExplainState *es);
|
||||
Agg *aggnode, Sort *sortnode,
|
||||
List *context, bool useprefix,
|
||||
List *ancestors, ExplainState *es);
|
||||
static void show_group_keys(GroupState *gstate, List *ancestors,
|
||||
ExplainState *es);
|
||||
ExplainState *es);
|
||||
static void show_sort_group_keys(PlanState *planstate, const char *qlabel,
|
||||
int nkeys, AttrNumber *keycols,
|
||||
Oid *sortOperators, Oid *collations, bool *nullsFirst,
|
||||
List *ancestors, ExplainState *es);
|
||||
int nkeys, AttrNumber *keycols,
|
||||
Oid *sortOperators, Oid *collations, bool *nullsFirst,
|
||||
List *ancestors, ExplainState *es);
|
||||
static void show_sortorder_options(StringInfo buf, Node *sortexpr,
|
||||
Oid sortOperator, Oid collation, bool nullsFirst);
|
||||
Oid sortOperator, Oid collation, bool nullsFirst);
|
||||
static void show_tablesample(TableSampleClause *tsc, PlanState *planstate,
|
||||
List *ancestors, ExplainState *es);
|
||||
List *ancestors, ExplainState *es);
|
||||
static void show_sort_info(SortState *sortstate, ExplainState *es);
|
||||
static void show_hash_info(HashState *hashstate, ExplainState *es);
|
||||
static void show_tidbitmap_info(BitmapHeapScanState *planstate,
|
||||
ExplainState *es);
|
||||
ExplainState *es);
|
||||
static void show_instrumentation_count(const char *qlabel, int which,
|
||||
PlanState *planstate, ExplainState *es);
|
||||
PlanState *planstate, ExplainState *es);
|
||||
static void show_foreignscan_info(ForeignScanState *fsstate, ExplainState *es);
|
||||
static void show_eval_params(Bitmapset *bms_params, ExplainState *es);
|
||||
static const char *explain_get_index_name(Oid indexId);
|
||||
static void show_buffer_usage(ExplainState *es, const BufferUsage *usage);
|
||||
static void ExplainIndexScanDetails(Oid indexid, ScanDirection indexorderdir,
|
||||
ExplainState *es);
|
||||
ExplainState *es);
|
||||
static void ExplainScanTarget(Scan *plan, ExplainState *es);
|
||||
static void ExplainModifyTarget(ModifyTable *plan, ExplainState *es);
|
||||
static void ExplainTargetRel(Plan *plan, Index rti, ExplainState *es);
|
||||
static void show_modifytable_info(ModifyTableState *mtstate, List *ancestors,
|
||||
ExplainState *es);
|
||||
ExplainState *es);
|
||||
static void ExplainMemberNodes(PlanState **planstates, int nsubnodes,
|
||||
int nplans, List *ancestors, ExplainState *es);
|
||||
int nplans, List *ancestors, ExplainState *es);
|
||||
static void ExplainSubPlans(List *plans, List *ancestors,
|
||||
const char *relationship, ExplainState *es);
|
||||
const char *relationship, ExplainState *es);
|
||||
static void ExplainCustomChildren(CustomScanState *css,
|
||||
List *ancestors, ExplainState *es);
|
||||
List *ancestors, ExplainState *es);
|
||||
static void ExplainProperty(const char *qlabel, const char *unit,
|
||||
const char *value, bool numeric, ExplainState *es);
|
||||
const char *value, bool numeric, ExplainState *es);
|
||||
static void ExplainDummyGroup(const char *objtype, const char *labelname,
|
||||
ExplainState *es);
|
||||
ExplainState *es);
|
||||
static void ExplainXMLTag(const char *tagname, int flags, ExplainState *es);
|
||||
static void ExplainJSONLineEnding(ExplainState *es);
|
||||
static void ExplainYAMLLineStarting(ExplainState *es);
|
||||
|
@ -104,27 +104,27 @@ typedef struct ExtensionVersionInfo
|
||||
|
||||
/* Local functions */
|
||||
static List *find_update_path(List *evi_list,
|
||||
ExtensionVersionInfo *evi_start,
|
||||
ExtensionVersionInfo *evi_target,
|
||||
bool reject_indirect,
|
||||
bool reinitialize);
|
||||
static Oid get_required_extension(char *reqExtensionName,
|
||||
char *extensionName,
|
||||
char *origSchemaName,
|
||||
bool cascade,
|
||||
List *parents,
|
||||
bool is_create);
|
||||
ExtensionVersionInfo *evi_start,
|
||||
ExtensionVersionInfo *evi_target,
|
||||
bool reject_indirect,
|
||||
bool reinitialize);
|
||||
static Oid get_required_extension(char *reqExtensionName,
|
||||
char *extensionName,
|
||||
char *origSchemaName,
|
||||
bool cascade,
|
||||
List *parents,
|
||||
bool is_create);
|
||||
static void get_available_versions_for_extension(ExtensionControlFile *pcontrol,
|
||||
Tuplestorestate *tupstore,
|
||||
TupleDesc tupdesc);
|
||||
Tuplestorestate *tupstore,
|
||||
TupleDesc tupdesc);
|
||||
static Datum convert_requires_to_datum(List *requires);
|
||||
static void ApplyExtensionUpdates(Oid extensionOid,
|
||||
ExtensionControlFile *pcontrol,
|
||||
const char *initialVersion,
|
||||
List *updateVersions,
|
||||
char *origSchemaName,
|
||||
bool cascade,
|
||||
bool is_create);
|
||||
ExtensionControlFile *pcontrol,
|
||||
const char *initialVersion,
|
||||
List *updateVersions,
|
||||
char *origSchemaName,
|
||||
bool cascade,
|
||||
bool is_create);
|
||||
static char *read_whole_file(const char *filename, int *length);
|
||||
|
||||
|
||||
|
@ -70,23 +70,23 @@
|
||||
/* non-export function prototypes */
|
||||
static void CheckPredicate(Expr *predicate);
|
||||
static void ComputeIndexAttrs(IndexInfo *indexInfo,
|
||||
Oid *typeOidP,
|
||||
Oid *collationOidP,
|
||||
Oid *classOidP,
|
||||
int16 *colOptionP,
|
||||
List *attList,
|
||||
List *exclusionOpNames,
|
||||
Oid relId,
|
||||
const char *accessMethodName, Oid accessMethodId,
|
||||
bool amcanorder,
|
||||
bool isconstraint);
|
||||
Oid *typeOidP,
|
||||
Oid *collationOidP,
|
||||
Oid *classOidP,
|
||||
int16 *colOptionP,
|
||||
List *attList,
|
||||
List *exclusionOpNames,
|
||||
Oid relId,
|
||||
const char *accessMethodName, Oid accessMethodId,
|
||||
bool amcanorder,
|
||||
bool isconstraint);
|
||||
static char *ChooseIndexName(const char *tabname, Oid namespaceId,
|
||||
List *colnames, List *exclusionOpNames,
|
||||
bool primary, bool isconstraint);
|
||||
List *colnames, List *exclusionOpNames,
|
||||
bool primary, bool isconstraint);
|
||||
static char *ChooseIndexNameAddition(List *colnames);
|
||||
static List *ChooseIndexColumnNames(List *indexElems);
|
||||
static void RangeVarCallbackForReindexIndex(const RangeVar *relation,
|
||||
Oid relId, Oid oldRelId, void *arg);
|
||||
Oid relId, Oid oldRelId, void *arg);
|
||||
static bool ReindexRelationConcurrently(Oid relationOid, int options);
|
||||
static void ReindexPartitionedIndex(Relation parentIdx);
|
||||
static void update_relispartition(Oid relationId, bool newval);
|
||||
|
@ -31,7 +31,7 @@
|
||||
static void LockTableRecurse(Oid reloid, LOCKMODE lockmode, bool nowait, Oid userid);
|
||||
static AclResult LockTableAclCheck(Oid relid, LOCKMODE lockmode, Oid userid);
|
||||
static void RangeVarCallbackForLockTable(const RangeVar *rv, Oid relid,
|
||||
Oid oldrelid, void *arg);
|
||||
Oid oldrelid, void *arg);
|
||||
static void LockViewRecurse(Oid reloid, LOCKMODE lockmode, bool nowait, List *ancestor_views);
|
||||
|
||||
/*
|
||||
|
@ -65,10 +65,10 @@ static bool transientrel_receive(TupleTableSlot *slot, DestReceiver *self);
|
||||
static void transientrel_shutdown(DestReceiver *self);
|
||||
static void transientrel_destroy(DestReceiver *self);
|
||||
static uint64 refresh_matview_datafill(DestReceiver *dest, Query *query,
|
||||
const char *queryString);
|
||||
const char *queryString);
|
||||
static char *make_temptable_name_n(char *tempname, int n);
|
||||
static void refresh_by_match_merge(Oid matviewOid, Oid tempOid, Oid relowner,
|
||||
int save_sec_context);
|
||||
int save_sec_context);
|
||||
static void refresh_by_heap_swap(Oid matviewOid, Oid OIDNewHeap, char relpersistence);
|
||||
static bool is_usable_unique_index(Relation indexRel);
|
||||
static void OpenMatViewIncrementalMaintenance(void);
|
||||
|
@ -52,27 +52,27 @@
|
||||
|
||||
|
||||
static void AlterOpFamilyAdd(AlterOpFamilyStmt *stmt,
|
||||
Oid amoid, Oid opfamilyoid,
|
||||
int maxOpNumber, int maxProcNumber,
|
||||
List *items);
|
||||
Oid amoid, Oid opfamilyoid,
|
||||
int maxOpNumber, int maxProcNumber,
|
||||
List *items);
|
||||
static void AlterOpFamilyDrop(AlterOpFamilyStmt *stmt,
|
||||
Oid amoid, Oid opfamilyoid,
|
||||
int maxOpNumber, int maxProcNumber,
|
||||
List *items);
|
||||
Oid amoid, Oid opfamilyoid,
|
||||
int maxOpNumber, int maxProcNumber,
|
||||
List *items);
|
||||
static void processTypesSpec(List *args, Oid *lefttype, Oid *righttype);
|
||||
static void assignOperTypes(OpFamilyMember *member, Oid amoid, Oid typeoid);
|
||||
static void assignProcTypes(OpFamilyMember *member, Oid amoid, Oid typeoid);
|
||||
static void addFamilyMember(List **list, OpFamilyMember *member, bool isProc);
|
||||
static void storeOperators(List *opfamilyname, Oid amoid,
|
||||
Oid opfamilyoid, Oid opclassoid,
|
||||
List *operators, bool isAdd);
|
||||
Oid opfamilyoid, Oid opclassoid,
|
||||
List *operators, bool isAdd);
|
||||
static void storeProcedures(List *opfamilyname, Oid amoid,
|
||||
Oid opfamilyoid, Oid opclassoid,
|
||||
List *procedures, bool isAdd);
|
||||
Oid opfamilyoid, Oid opclassoid,
|
||||
List *procedures, bool isAdd);
|
||||
static void dropOperators(List *opfamilyname, Oid amoid, Oid opfamilyoid,
|
||||
List *operators);
|
||||
List *operators);
|
||||
static void dropProcedures(List *opfamilyname, Oid amoid, Oid opfamilyoid,
|
||||
List *procedures);
|
||||
List *procedures);
|
||||
|
||||
/*
|
||||
* OpFamilyCacheLookup
|
||||
|
@ -48,7 +48,7 @@
|
||||
#include "utils/syscache.h"
|
||||
|
||||
static void RangeVarCallbackForPolicy(const RangeVar *rv,
|
||||
Oid relid, Oid oldrelid, void *arg);
|
||||
Oid relid, Oid oldrelid, void *arg);
|
||||
static char parse_policy_command(const char *cmd_name);
|
||||
static Datum *policy_role_list_to_array(List *roles, int *num_roles);
|
||||
|
||||
|
@ -47,7 +47,7 @@ static HTAB *prepared_queries = NULL;
|
||||
|
||||
static void InitQueryHashTable(void);
|
||||
static ParamListInfo EvaluateParams(PreparedStatement *pstmt, List *params,
|
||||
const char *queryString, EState *estate);
|
||||
const char *queryString, EState *estate);
|
||||
static Datum build_regtype_array(Oid *param_types, int num_params);
|
||||
|
||||
/*
|
||||
|
@ -51,8 +51,8 @@ typedef struct
|
||||
} PLTemplate;
|
||||
|
||||
static ObjectAddress create_proc_lang(const char *languageName, bool replace,
|
||||
Oid languageOwner, Oid handlerOid, Oid inlineOid,
|
||||
Oid valOid, bool trusted);
|
||||
Oid languageOwner, Oid handlerOid, Oid inlineOid,
|
||||
Oid valOid, bool trusted);
|
||||
static PLTemplate *find_language_template(const char *languageName);
|
||||
|
||||
/*
|
||||
|
@ -53,7 +53,7 @@
|
||||
static List *OpenTableList(List *tables);
|
||||
static void CloseTableList(List *rels);
|
||||
static void PublicationAddTables(Oid pubid, List *rels, bool if_not_exists,
|
||||
AlterPublicationStmt *stmt);
|
||||
AlterPublicationStmt *stmt);
|
||||
static void PublicationDropTables(Oid pubid, List *rels, bool missing_ok);
|
||||
|
||||
static void
|
||||
|
@ -99,13 +99,13 @@ static Relation lock_and_open_sequence(SeqTable seq);
|
||||
static void create_seq_hashtable(void);
|
||||
static void init_sequence(Oid relid, SeqTable *p_elm, Relation *p_rel);
|
||||
static Form_pg_sequence_data read_seq_tuple(Relation rel,
|
||||
Buffer *buf, HeapTuple seqdatatuple);
|
||||
Buffer *buf, HeapTuple seqdatatuple);
|
||||
static void init_params(ParseState *pstate, List *options, bool for_identity,
|
||||
bool isInit,
|
||||
Form_pg_sequence seqform,
|
||||
Form_pg_sequence_data seqdataform,
|
||||
bool *need_seq_rewrite,
|
||||
List **owned_by);
|
||||
bool isInit,
|
||||
Form_pg_sequence seqform,
|
||||
Form_pg_sequence_data seqdataform,
|
||||
bool *need_seq_rewrite,
|
||||
List **owned_by);
|
||||
static void do_setval(Oid relid, int64 next, bool iscalled);
|
||||
static void process_owned_by(Relation seqrel, List *owned_by, bool for_identity);
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
|
||||
|
||||
static char *ChooseExtendedStatisticName(const char *name1, const char *name2,
|
||||
const char *label, Oid namespaceid);
|
||||
const char *label, Oid namespaceid);
|
||||
static char *ChooseExtendedStatisticNameAddition(List *exprs);
|
||||
|
||||
|
||||
|
@ -302,196 +302,196 @@ struct DropRelationCallbackState
|
||||
static void truncate_check_rel(Oid relid, Form_pg_class reltuple);
|
||||
static void truncate_check_activity(Relation rel);
|
||||
static void RangeVarCallbackForTruncate(const RangeVar *relation,
|
||||
Oid relId, Oid oldRelId, void *arg);
|
||||
Oid relId, Oid oldRelId, void *arg);
|
||||
static List *MergeAttributes(List *schema, List *supers, char relpersistence,
|
||||
bool is_partition, List **supconstr);
|
||||
bool is_partition, List **supconstr);
|
||||
static bool MergeCheckConstraint(List *constraints, char *name, Node *expr);
|
||||
static void MergeAttributesIntoExisting(Relation child_rel, Relation parent_rel);
|
||||
static void MergeConstraintsIntoExisting(Relation child_rel, Relation parent_rel);
|
||||
static void StoreCatalogInheritance(Oid relationId, List *supers,
|
||||
bool child_is_partition);
|
||||
bool child_is_partition);
|
||||
static void StoreCatalogInheritance1(Oid relationId, Oid parentOid,
|
||||
int32 seqNumber, Relation inhRelation,
|
||||
bool child_is_partition);
|
||||
int32 seqNumber, Relation inhRelation,
|
||||
bool child_is_partition);
|
||||
static int findAttrByName(const char *attributeName, List *schema);
|
||||
static void AlterIndexNamespaces(Relation classRel, Relation rel,
|
||||
Oid oldNspOid, Oid newNspOid, ObjectAddresses *objsMoved);
|
||||
Oid oldNspOid, Oid newNspOid, ObjectAddresses *objsMoved);
|
||||
static void AlterSeqNamespaces(Relation classRel, Relation rel,
|
||||
Oid oldNspOid, Oid newNspOid, ObjectAddresses *objsMoved,
|
||||
LOCKMODE lockmode);
|
||||
Oid oldNspOid, Oid newNspOid, ObjectAddresses *objsMoved,
|
||||
LOCKMODE lockmode);
|
||||
static ObjectAddress ATExecAlterConstraint(Relation rel, AlterTableCmd *cmd,
|
||||
bool recurse, bool recursing, LOCKMODE lockmode);
|
||||
bool recurse, bool recursing, LOCKMODE lockmode);
|
||||
static ObjectAddress ATExecValidateConstraint(Relation rel, char *constrName,
|
||||
bool recurse, bool recursing, LOCKMODE lockmode);
|
||||
static int transformColumnNameList(Oid relId, List *colList,
|
||||
int16 *attnums, Oid *atttypids);
|
||||
static int transformFkeyGetPrimaryKey(Relation pkrel, Oid *indexOid,
|
||||
List **attnamelist,
|
||||
int16 *attnums, Oid *atttypids,
|
||||
Oid *opclasses);
|
||||
static Oid transformFkeyCheckAttrs(Relation pkrel,
|
||||
int numattrs, int16 *attnums,
|
||||
Oid *opclasses);
|
||||
bool recurse, bool recursing, LOCKMODE lockmode);
|
||||
static int transformColumnNameList(Oid relId, List *colList,
|
||||
int16 *attnums, Oid *atttypids);
|
||||
static int transformFkeyGetPrimaryKey(Relation pkrel, Oid *indexOid,
|
||||
List **attnamelist,
|
||||
int16 *attnums, Oid *atttypids,
|
||||
Oid *opclasses);
|
||||
static Oid transformFkeyCheckAttrs(Relation pkrel,
|
||||
int numattrs, int16 *attnums,
|
||||
Oid *opclasses);
|
||||
static void checkFkeyPermissions(Relation rel, int16 *attnums, int natts);
|
||||
static CoercionPathType findFkeyCast(Oid targetTypeId, Oid sourceTypeId,
|
||||
Oid *funcid);
|
||||
Oid *funcid);
|
||||
static void validateCheckConstraint(Relation rel, HeapTuple constrtup);
|
||||
static void validateForeignKeyConstraint(char *conname,
|
||||
Relation rel, Relation pkrel,
|
||||
Oid pkindOid, Oid constraintOid);
|
||||
Relation rel, Relation pkrel,
|
||||
Oid pkindOid, Oid constraintOid);
|
||||
static void ATController(AlterTableStmt *parsetree,
|
||||
Relation rel, List *cmds, bool recurse, LOCKMODE lockmode);
|
||||
Relation rel, List *cmds, bool recurse, LOCKMODE lockmode);
|
||||
static void ATPrepCmd(List **wqueue, Relation rel, AlterTableCmd *cmd,
|
||||
bool recurse, bool recursing, LOCKMODE lockmode);
|
||||
bool recurse, bool recursing, LOCKMODE lockmode);
|
||||
static void ATRewriteCatalogs(List **wqueue, LOCKMODE lockmode);
|
||||
static void ATExecCmd(List **wqueue, AlteredTableInfo *tab, Relation rel,
|
||||
AlterTableCmd *cmd, LOCKMODE lockmode);
|
||||
AlterTableCmd *cmd, LOCKMODE lockmode);
|
||||
static void ATRewriteTables(AlterTableStmt *parsetree,
|
||||
List **wqueue, LOCKMODE lockmode);
|
||||
List **wqueue, LOCKMODE lockmode);
|
||||
static void ATRewriteTable(AlteredTableInfo *tab, Oid OIDNewHeap, LOCKMODE lockmode);
|
||||
static AlteredTableInfo *ATGetQueueEntry(List **wqueue, Relation rel);
|
||||
static void ATSimplePermissions(Relation rel, int allowed_targets);
|
||||
static void ATWrongRelkindError(Relation rel, int allowed_targets);
|
||||
static void ATSimpleRecursion(List **wqueue, Relation rel,
|
||||
AlterTableCmd *cmd, bool recurse, LOCKMODE lockmode);
|
||||
AlterTableCmd *cmd, bool recurse, LOCKMODE lockmode);
|
||||
static void ATTypedTableRecursion(List **wqueue, Relation rel, AlterTableCmd *cmd,
|
||||
LOCKMODE lockmode);
|
||||
LOCKMODE lockmode);
|
||||
static List *find_typed_table_dependencies(Oid typeOid, const char *typeName,
|
||||
DropBehavior behavior);
|
||||
DropBehavior behavior);
|
||||
static void ATPrepAddColumn(List **wqueue, Relation rel, bool recurse, bool recursing,
|
||||
bool is_view, AlterTableCmd *cmd, LOCKMODE lockmode);
|
||||
bool is_view, AlterTableCmd *cmd, LOCKMODE lockmode);
|
||||
static ObjectAddress ATExecAddColumn(List **wqueue, AlteredTableInfo *tab,
|
||||
Relation rel, ColumnDef *colDef,
|
||||
bool recurse, bool recursing,
|
||||
bool if_not_exists, LOCKMODE lockmode);
|
||||
Relation rel, ColumnDef *colDef,
|
||||
bool recurse, bool recursing,
|
||||
bool if_not_exists, LOCKMODE lockmode);
|
||||
static bool check_for_column_name_collision(Relation rel, const char *colname,
|
||||
bool if_not_exists);
|
||||
bool if_not_exists);
|
||||
static void add_column_datatype_dependency(Oid relid, int32 attnum, Oid typid);
|
||||
static void add_column_collation_dependency(Oid relid, int32 attnum, Oid collid);
|
||||
static void ATPrepDropNotNull(Relation rel, bool recurse, bool recursing);
|
||||
static ObjectAddress ATExecDropNotNull(Relation rel, const char *colName, LOCKMODE lockmode);
|
||||
static void ATPrepSetNotNull(List **wqueue, Relation rel,
|
||||
AlterTableCmd *cmd, bool recurse, bool recursing,
|
||||
LOCKMODE lockmode);
|
||||
AlterTableCmd *cmd, bool recurse, bool recursing,
|
||||
LOCKMODE lockmode);
|
||||
static ObjectAddress ATExecSetNotNull(AlteredTableInfo *tab, Relation rel,
|
||||
const char *colName, LOCKMODE lockmode);
|
||||
const char *colName, LOCKMODE lockmode);
|
||||
static void ATExecCheckNotNull(AlteredTableInfo *tab, Relation rel,
|
||||
const char *colName, LOCKMODE lockmode);
|
||||
const char *colName, LOCKMODE lockmode);
|
||||
static bool NotNullImpliedByRelConstraints(Relation rel, Form_pg_attribute attr);
|
||||
static bool ConstraintImpliedByRelConstraint(Relation scanrel,
|
||||
List *partConstraint, List *existedConstraints);
|
||||
List *partConstraint, List *existedConstraints);
|
||||
static ObjectAddress ATExecColumnDefault(Relation rel, const char *colName,
|
||||
Node *newDefault, LOCKMODE lockmode);
|
||||
Node *newDefault, LOCKMODE lockmode);
|
||||
static ObjectAddress ATExecAddIdentity(Relation rel, const char *colName,
|
||||
Node *def, LOCKMODE lockmode);
|
||||
Node *def, LOCKMODE lockmode);
|
||||
static ObjectAddress ATExecSetIdentity(Relation rel, const char *colName,
|
||||
Node *def, LOCKMODE lockmode);
|
||||
Node *def, LOCKMODE lockmode);
|
||||
static ObjectAddress ATExecDropIdentity(Relation rel, const char *colName, bool missing_ok, LOCKMODE lockmode);
|
||||
static void ATPrepSetStatistics(Relation rel, const char *colName, int16 colNum,
|
||||
Node *newValue, LOCKMODE lockmode);
|
||||
Node *newValue, LOCKMODE lockmode);
|
||||
static ObjectAddress ATExecSetStatistics(Relation rel, const char *colName, int16 colNum,
|
||||
Node *newValue, LOCKMODE lockmode);
|
||||
Node *newValue, LOCKMODE lockmode);
|
||||
static ObjectAddress ATExecSetOptions(Relation rel, const char *colName,
|
||||
Node *options, bool isReset, LOCKMODE lockmode);
|
||||
Node *options, bool isReset, LOCKMODE lockmode);
|
||||
static ObjectAddress ATExecSetStorage(Relation rel, const char *colName,
|
||||
Node *newValue, LOCKMODE lockmode);
|
||||
Node *newValue, LOCKMODE lockmode);
|
||||
static void ATPrepDropColumn(List **wqueue, Relation rel, bool recurse, bool recursing,
|
||||
AlterTableCmd *cmd, LOCKMODE lockmode);
|
||||
AlterTableCmd *cmd, LOCKMODE lockmode);
|
||||
static ObjectAddress ATExecDropColumn(List **wqueue, Relation rel, const char *colName,
|
||||
DropBehavior behavior,
|
||||
bool recurse, bool recursing,
|
||||
bool missing_ok, LOCKMODE lockmode);
|
||||
DropBehavior behavior,
|
||||
bool recurse, bool recursing,
|
||||
bool missing_ok, LOCKMODE lockmode);
|
||||
static ObjectAddress ATExecAddIndex(AlteredTableInfo *tab, Relation rel,
|
||||
IndexStmt *stmt, bool is_rebuild, LOCKMODE lockmode);
|
||||
IndexStmt *stmt, bool is_rebuild, LOCKMODE lockmode);
|
||||
static ObjectAddress ATExecAddConstraint(List **wqueue,
|
||||
AlteredTableInfo *tab, Relation rel,
|
||||
Constraint *newConstraint, bool recurse, bool is_readd,
|
||||
LOCKMODE lockmode);
|
||||
AlteredTableInfo *tab, Relation rel,
|
||||
Constraint *newConstraint, bool recurse, bool is_readd,
|
||||
LOCKMODE lockmode);
|
||||
static char *ChooseForeignKeyConstraintNameAddition(List *colnames);
|
||||
static ObjectAddress ATExecAddIndexConstraint(AlteredTableInfo *tab, Relation rel,
|
||||
IndexStmt *stmt, LOCKMODE lockmode);
|
||||
IndexStmt *stmt, LOCKMODE lockmode);
|
||||
static ObjectAddress ATAddCheckConstraint(List **wqueue,
|
||||
AlteredTableInfo *tab, Relation rel,
|
||||
Constraint *constr,
|
||||
bool recurse, bool recursing, bool is_readd,
|
||||
LOCKMODE lockmode);
|
||||
AlteredTableInfo *tab, Relation rel,
|
||||
Constraint *constr,
|
||||
bool recurse, bool recursing, bool is_readd,
|
||||
LOCKMODE lockmode);
|
||||
static ObjectAddress ATAddForeignKeyConstraint(List **wqueue, AlteredTableInfo *tab,
|
||||
Relation rel, Constraint *fkconstraint, Oid parentConstr,
|
||||
bool recurse, bool recursing,
|
||||
LOCKMODE lockmode);
|
||||
Relation rel, Constraint *fkconstraint, Oid parentConstr,
|
||||
bool recurse, bool recursing,
|
||||
LOCKMODE lockmode);
|
||||
static ObjectAddress addFkRecurseReferenced(List **wqueue, Constraint *fkconstraint,
|
||||
Relation rel, Relation pkrel, Oid indexOid, Oid parentConstr,
|
||||
int numfks, int16 *pkattnum, int16 *fkattnum,
|
||||
Oid *pfeqoperators, Oid *ppeqoperators, Oid *ffeqoperators,
|
||||
bool old_check_ok);
|
||||
Relation rel, Relation pkrel, Oid indexOid, Oid parentConstr,
|
||||
int numfks, int16 *pkattnum, int16 *fkattnum,
|
||||
Oid *pfeqoperators, Oid *ppeqoperators, Oid *ffeqoperators,
|
||||
bool old_check_ok);
|
||||
static void addFkRecurseReferencing(List **wqueue, Constraint *fkconstraint,
|
||||
Relation rel, Relation pkrel, Oid indexOid, Oid parentConstr,
|
||||
int numfks, int16 *pkattnum, int16 *fkattnum,
|
||||
Oid *pfeqoperators, Oid *ppeqoperators, Oid *ffeqoperators,
|
||||
bool old_check_ok, LOCKMODE lockmode);
|
||||
Relation rel, Relation pkrel, Oid indexOid, Oid parentConstr,
|
||||
int numfks, int16 *pkattnum, int16 *fkattnum,
|
||||
Oid *pfeqoperators, Oid *ppeqoperators, Oid *ffeqoperators,
|
||||
bool old_check_ok, LOCKMODE lockmode);
|
||||
static void CloneForeignKeyConstraints(List **wqueue, Relation parentRel,
|
||||
Relation partitionRel);
|
||||
Relation partitionRel);
|
||||
static void CloneFkReferenced(Relation parentRel, Relation partitionRel);
|
||||
static void CloneFkReferencing(List **wqueue, Relation parentRel,
|
||||
Relation partRel);
|
||||
Relation partRel);
|
||||
static void createForeignKeyCheckTriggers(Oid myRelOid, Oid refRelOid,
|
||||
Constraint *fkconstraint, Oid constraintOid,
|
||||
Oid indexOid);
|
||||
Constraint *fkconstraint, Oid constraintOid,
|
||||
Oid indexOid);
|
||||
static void createForeignKeyActionTriggers(Relation rel, Oid refRelOid,
|
||||
Constraint *fkconstraint, Oid constraintOid,
|
||||
Oid indexOid);
|
||||
Constraint *fkconstraint, Oid constraintOid,
|
||||
Oid indexOid);
|
||||
static bool tryAttachPartitionForeignKey(ForeignKeyCacheInfo *fk,
|
||||
Oid partRelid,
|
||||
Oid parentConstrOid, int numfks,
|
||||
AttrNumber *mapped_conkey, AttrNumber *confkey,
|
||||
Oid *conpfeqop);
|
||||
Oid partRelid,
|
||||
Oid parentConstrOid, int numfks,
|
||||
AttrNumber *mapped_conkey, AttrNumber *confkey,
|
||||
Oid *conpfeqop);
|
||||
static void ATExecDropConstraint(Relation rel, const char *constrName,
|
||||
DropBehavior behavior,
|
||||
bool recurse, bool recursing,
|
||||
bool missing_ok, LOCKMODE lockmode);
|
||||
DropBehavior behavior,
|
||||
bool recurse, bool recursing,
|
||||
bool missing_ok, LOCKMODE lockmode);
|
||||
static void ATPrepAlterColumnType(List **wqueue,
|
||||
AlteredTableInfo *tab, Relation rel,
|
||||
bool recurse, bool recursing,
|
||||
AlterTableCmd *cmd, LOCKMODE lockmode);
|
||||
AlteredTableInfo *tab, Relation rel,
|
||||
bool recurse, bool recursing,
|
||||
AlterTableCmd *cmd, LOCKMODE lockmode);
|
||||
static bool ATColumnChangeRequiresRewrite(Node *expr, AttrNumber varattno);
|
||||
static ObjectAddress ATExecAlterColumnType(AlteredTableInfo *tab, Relation rel,
|
||||
AlterTableCmd *cmd, LOCKMODE lockmode);
|
||||
AlterTableCmd *cmd, LOCKMODE lockmode);
|
||||
static ObjectAddress ATExecAlterColumnGenericOptions(Relation rel, const char *colName,
|
||||
List *options, LOCKMODE lockmode);
|
||||
List *options, LOCKMODE lockmode);
|
||||
static void ATPostAlterTypeCleanup(List **wqueue, AlteredTableInfo *tab,
|
||||
LOCKMODE lockmode);
|
||||
LOCKMODE lockmode);
|
||||
static void ATPostAlterTypeParse(Oid oldId, Oid oldRelId, Oid refRelId,
|
||||
char *cmd, List **wqueue, LOCKMODE lockmode,
|
||||
bool rewrite);
|
||||
char *cmd, List **wqueue, LOCKMODE lockmode,
|
||||
bool rewrite);
|
||||
static void RebuildConstraintComment(AlteredTableInfo *tab, int pass,
|
||||
Oid objid, Relation rel, List *domname,
|
||||
const char *conname);
|
||||
Oid objid, Relation rel, List *domname,
|
||||
const char *conname);
|
||||
static void TryReuseIndex(Oid oldId, IndexStmt *stmt);
|
||||
static void TryReuseForeignKey(Oid oldId, Constraint *con);
|
||||
static void change_owner_fix_column_acls(Oid relationOid,
|
||||
Oid oldOwnerId, Oid newOwnerId);
|
||||
Oid oldOwnerId, Oid newOwnerId);
|
||||
static void change_owner_recurse_to_sequences(Oid relationOid,
|
||||
Oid newOwnerId, LOCKMODE lockmode);
|
||||
Oid newOwnerId, LOCKMODE lockmode);
|
||||
static ObjectAddress ATExecClusterOn(Relation rel, const char *indexName,
|
||||
LOCKMODE lockmode);
|
||||
LOCKMODE lockmode);
|
||||
static void ATExecDropCluster(Relation rel, LOCKMODE lockmode);
|
||||
static bool ATPrepChangePersistence(Relation rel, bool toLogged);
|
||||
static void ATPrepSetTableSpace(AlteredTableInfo *tab, Relation rel,
|
||||
const char *tablespacename, LOCKMODE lockmode);
|
||||
const char *tablespacename, LOCKMODE lockmode);
|
||||
static void ATExecSetTableSpace(Oid tableOid, Oid newTableSpace, LOCKMODE lockmode);
|
||||
static void ATExecSetTableSpaceNoStorage(Relation rel, Oid newTableSpace);
|
||||
static void ATExecSetRelOptions(Relation rel, List *defList,
|
||||
AlterTableType operation,
|
||||
LOCKMODE lockmode);
|
||||
AlterTableType operation,
|
||||
LOCKMODE lockmode);
|
||||
static void ATExecEnableDisableTrigger(Relation rel, const char *trigname,
|
||||
char fires_when, bool skip_system, LOCKMODE lockmode);
|
||||
char fires_when, bool skip_system, LOCKMODE lockmode);
|
||||
static void ATExecEnableDisableRule(Relation rel, const char *rulename,
|
||||
char fires_when, LOCKMODE lockmode);
|
||||
char fires_when, LOCKMODE lockmode);
|
||||
static void ATPrepAddInherit(Relation child_rel);
|
||||
static ObjectAddress ATExecAddInherit(Relation child_rel, RangeVar *parent, LOCKMODE lockmode);
|
||||
static ObjectAddress ATExecDropInherit(Relation rel, RangeVar *parent, LOCKMODE lockmode);
|
||||
static void drop_parent_dependency(Oid relid, Oid refclassid, Oid refobjid,
|
||||
DependencyType deptype);
|
||||
DependencyType deptype);
|
||||
static ObjectAddress ATExecAddOf(Relation rel, const TypeName *ofTypename, LOCKMODE lockmode);
|
||||
static void ATExecDropOf(Relation rel, LOCKMODE lockmode);
|
||||
static void ATExecReplicaIdentity(Relation rel, ReplicaIdentityStmt *stmt, LOCKMODE lockmode);
|
||||
@ -504,27 +504,27 @@ static void index_copy_data(Relation rel, RelFileNode newrnode);
|
||||
static const char *storage_name(char c);
|
||||
|
||||
static void RangeVarCallbackForDropRelation(const RangeVar *rel, Oid relOid,
|
||||
Oid oldRelOid, void *arg);
|
||||
Oid oldRelOid, void *arg);
|
||||
static void RangeVarCallbackForAlterRelation(const RangeVar *rv, Oid relid,
|
||||
Oid oldrelid, void *arg);
|
||||
Oid oldrelid, void *arg);
|
||||
static PartitionSpec *transformPartitionSpec(Relation rel, PartitionSpec *partspec, char *strategy);
|
||||
static void ComputePartitionAttrs(ParseState *pstate, Relation rel, List *partParams, AttrNumber *partattrs,
|
||||
List **partexprs, Oid *partopclass, Oid *partcollation, char strategy);
|
||||
List **partexprs, Oid *partopclass, Oid *partcollation, char strategy);
|
||||
static void CreateInheritance(Relation child_rel, Relation parent_rel);
|
||||
static void RemoveInheritance(Relation child_rel, Relation parent_rel);
|
||||
static ObjectAddress ATExecAttachPartition(List **wqueue, Relation rel,
|
||||
PartitionCmd *cmd);
|
||||
PartitionCmd *cmd);
|
||||
static void AttachPartitionEnsureIndexes(Relation rel, Relation attachrel);
|
||||
static void QueuePartitionConstraintValidation(List **wqueue, Relation scanrel,
|
||||
List *partConstraint,
|
||||
bool validate_default);
|
||||
List *partConstraint,
|
||||
bool validate_default);
|
||||
static void CloneRowTriggersToPartition(Relation parent, Relation partition);
|
||||
static ObjectAddress ATExecDetachPartition(Relation rel, RangeVar *name);
|
||||
static ObjectAddress ATExecAttachPartitionIdx(List **wqueue, Relation rel,
|
||||
RangeVar *name);
|
||||
RangeVar *name);
|
||||
static void validatePartitionedIndex(Relation partedIdx, Relation partedTbl);
|
||||
static void refuseDupeIndexAttach(Relation parentIdx, Relation partIdx,
|
||||
Relation partitionTbl);
|
||||
Relation partitionTbl);
|
||||
static List *GetParentedForeignKeyRefs(Relation partition);
|
||||
static void ATDetachCheckNoForeignKeyRefs(Relation partition);
|
||||
|
||||
|
@ -91,7 +91,7 @@ char *temp_tablespaces = NULL;
|
||||
|
||||
|
||||
static void create_tablespace_directories(const char *location,
|
||||
const Oid tablespaceoid);
|
||||
const Oid tablespaceoid);
|
||||
static bool destroy_tablespace_directories(Oid tablespaceoid, bool redo);
|
||||
|
||||
|
||||
|
@ -83,26 +83,26 @@ static int MyTriggerDepth = 0;
|
||||
static void ConvertTriggerToFK(CreateTrigStmt *stmt, Oid funcoid);
|
||||
static void SetTriggerFlags(TriggerDesc *trigdesc, Trigger *trigger);
|
||||
static bool GetTupleForTrigger(EState *estate,
|
||||
EPQState *epqstate,
|
||||
ResultRelInfo *relinfo,
|
||||
ItemPointer tid,
|
||||
LockTupleMode lockmode,
|
||||
TupleTableSlot *oldslot,
|
||||
TupleTableSlot **newSlot);
|
||||
EPQState *epqstate,
|
||||
ResultRelInfo *relinfo,
|
||||
ItemPointer tid,
|
||||
LockTupleMode lockmode,
|
||||
TupleTableSlot *oldslot,
|
||||
TupleTableSlot **newSlot);
|
||||
static bool TriggerEnabled(EState *estate, ResultRelInfo *relinfo,
|
||||
Trigger *trigger, TriggerEvent event,
|
||||
Bitmapset *modifiedCols,
|
||||
TupleTableSlot *oldslot, TupleTableSlot *newslot);
|
||||
Trigger *trigger, TriggerEvent event,
|
||||
Bitmapset *modifiedCols,
|
||||
TupleTableSlot *oldslot, TupleTableSlot *newslot);
|
||||
static HeapTuple ExecCallTriggerFunc(TriggerData *trigdata,
|
||||
int tgindx,
|
||||
FmgrInfo *finfo,
|
||||
Instrumentation *instr,
|
||||
MemoryContext per_tuple_context);
|
||||
int tgindx,
|
||||
FmgrInfo *finfo,
|
||||
Instrumentation *instr,
|
||||
MemoryContext per_tuple_context);
|
||||
static void AfterTriggerSaveEvent(EState *estate, ResultRelInfo *relinfo,
|
||||
int event, bool row_trigger,
|
||||
TupleTableSlot *oldtup, TupleTableSlot *newtup,
|
||||
List *recheckIndexes, Bitmapset *modifiedCols,
|
||||
TransitionCaptureState *transition_capture);
|
||||
int event, bool row_trigger,
|
||||
TupleTableSlot *oldtup, TupleTableSlot *newtup,
|
||||
List *recheckIndexes, Bitmapset *modifiedCols,
|
||||
TransitionCaptureState *transition_capture);
|
||||
static void AfterTriggerEnlargeQueryState(void);
|
||||
static bool before_stmt_triggers_fired(Oid relid, CmdType cmdType);
|
||||
|
||||
@ -3843,21 +3843,21 @@ struct AfterTriggersTableData
|
||||
static AfterTriggersData afterTriggers;
|
||||
|
||||
static void AfterTriggerExecute(EState *estate,
|
||||
AfterTriggerEvent event,
|
||||
ResultRelInfo *relInfo,
|
||||
TriggerDesc *trigdesc,
|
||||
FmgrInfo *finfo,
|
||||
Instrumentation *instr,
|
||||
MemoryContext per_tuple_context,
|
||||
TupleTableSlot *trig_tuple_slot1,
|
||||
TupleTableSlot *trig_tuple_slot2);
|
||||
AfterTriggerEvent event,
|
||||
ResultRelInfo *relInfo,
|
||||
TriggerDesc *trigdesc,
|
||||
FmgrInfo *finfo,
|
||||
Instrumentation *instr,
|
||||
MemoryContext per_tuple_context,
|
||||
TupleTableSlot *trig_tuple_slot1,
|
||||
TupleTableSlot *trig_tuple_slot2);
|
||||
static AfterTriggersTableData *GetAfterTriggersTableData(Oid relid,
|
||||
CmdType cmdType);
|
||||
CmdType cmdType);
|
||||
static void AfterTriggerFreeQuery(AfterTriggersQueryData *qs);
|
||||
static SetConstraintState SetConstraintStateCreate(int numalloc);
|
||||
static SetConstraintState SetConstraintStateCopy(SetConstraintState state);
|
||||
static SetConstraintState SetConstraintStateAddItem(SetConstraintState state,
|
||||
Oid tgoid, bool tgisdeferred);
|
||||
Oid tgoid, bool tgisdeferred);
|
||||
static void cancel_prior_stmt_triggers(Oid relid, CmdType cmdType, int tgevent);
|
||||
|
||||
|
||||
|
@ -49,9 +49,9 @@
|
||||
|
||||
|
||||
static void MakeConfigurationMapping(AlterTSConfigurationStmt *stmt,
|
||||
HeapTuple tup, Relation relMap);
|
||||
HeapTuple tup, Relation relMap);
|
||||
static void DropConfigurationMapping(AlterTSConfigurationStmt *stmt,
|
||||
HeapTuple tup, Relation relMap);
|
||||
HeapTuple tup, Relation relMap);
|
||||
|
||||
|
||||
/* --------------------- TS Parser commands ------------------------ */
|
||||
|
@ -87,7 +87,7 @@ typedef struct
|
||||
Oid binary_upgrade_next_array_pg_type_oid = InvalidOid;
|
||||
|
||||
static void makeRangeConstructors(const char *name, Oid namespace,
|
||||
Oid rangeOid, Oid subtype);
|
||||
Oid rangeOid, Oid subtype);
|
||||
static Oid findTypeInputFunction(List *procname, Oid typeOid);
|
||||
static Oid findTypeOutputFunction(List *procname, Oid typeOid);
|
||||
static Oid findTypeReceiveFunction(List *procname, Oid typeOid);
|
||||
@ -102,11 +102,11 @@ static void validateDomainConstraint(Oid domainoid, char *ccbin);
|
||||
static List *get_rels_with_domain(Oid domainOid, LOCKMODE lockmode);
|
||||
static void checkEnumOwner(HeapTuple tup);
|
||||
static char *domainAddConstraint(Oid domainOid, Oid domainNamespace,
|
||||
Oid baseTypeOid,
|
||||
int typMod, Constraint *constr,
|
||||
const char *domainName, ObjectAddress *constrAddr);
|
||||
Oid baseTypeOid,
|
||||
int typMod, Constraint *constr,
|
||||
const char *domainName, ObjectAddress *constrAddr);
|
||||
static Node *replace_domain_constraint_value(ParseState *pstate,
|
||||
ColumnRef *cref);
|
||||
ColumnRef *cref);
|
||||
|
||||
|
||||
/*
|
||||
|
@ -49,11 +49,11 @@ int Password_encryption = PASSWORD_TYPE_MD5;
|
||||
check_password_hook_type check_password_hook = NULL;
|
||||
|
||||
static void AddRoleMems(const char *rolename, Oid roleid,
|
||||
List *memberSpecs, List *memberIds,
|
||||
Oid grantorId, bool admin_opt);
|
||||
List *memberSpecs, List *memberIds,
|
||||
Oid grantorId, bool admin_opt);
|
||||
static void DelRoleMems(const char *rolename, Oid roleid,
|
||||
List *memberSpecs, List *memberIds,
|
||||
bool admin_opt);
|
||||
List *memberSpecs, List *memberIds,
|
||||
bool admin_opt);
|
||||
|
||||
|
||||
/* Check if current user has createrole privileges */
|
||||
|
@ -72,9 +72,9 @@ static BufferAccessStrategy vac_strategy;
|
||||
static List *expand_vacuum_rel(VacuumRelation *vrel, int options);
|
||||
static List *get_all_vacuum_rels(int options);
|
||||
static void vac_truncate_clog(TransactionId frozenXID,
|
||||
MultiXactId minMulti,
|
||||
TransactionId lastSaneFrozenXid,
|
||||
MultiXactId lastSaneMinMulti);
|
||||
MultiXactId minMulti,
|
||||
TransactionId lastSaneFrozenXid,
|
||||
MultiXactId lastSaneMinMulti);
|
||||
static bool vacuum_rel(Oid relid, RangeVar *relation, VacuumParams *params);
|
||||
static VacOptTernaryValue get_vacopt_ternary_value(DefElem *def);
|
||||
|
||||
|
Reference in New Issue
Block a user