aboutsummaryrefslogtreecommitdiff
path: root/src/pl
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2019-05-22 13:04:48 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2019-05-22 13:04:48 -0400
commit8255c7a5eeba8f1a38b7a431c04909bde4f5e67d (patch)
tree50b5b32eaf388701b2714244a10fb23f8d4a2c7c /src/pl
parentbe76af171cdb3e7465c4ef234af403f97ad79b7b (diff)
downloadpostgresql-8255c7a5eeba8f1a38b7a431c04909bde4f5e67d.tar.gz
postgresql-8255c7a5eeba8f1a38b7a431c04909bde4f5e67d.zip
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
Diffstat (limited to 'src/pl')
-rw-r--r--src/pl/plperl/plperl.c18
-rw-r--r--src/pl/plpgsql/src/pl_comp.c24
-rw-r--r--src/pl/plpgsql/src/pl_exec.c274
-rw-r--r--src/pl/plpgsql/src/plpgsql.h58
-rw-r--r--src/pl/plpython/plpy_elog.c12
-rw-r--r--src/pl/plpython/plpy_elog.h2
-rw-r--r--src/pl/plpython/plpy_exec.c4
-rw-r--r--src/pl/plpython/plpy_plpymodule.c6
-rw-r--r--src/pl/plpython/plpy_spi.c2
-rw-r--r--src/pl/plpython/plpy_typeio.c20
-rw-r--r--src/pl/plpython/plpy_typeio.h18
-rw-r--r--src/pl/tcl/pltcl.c82
12 files changed, 260 insertions, 260 deletions
diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c
index bda9517971f..5cb3a447291 100644
--- a/src/pl/plperl/plperl.c
+++ b/src/pl/plperl/plperl.c
@@ -263,8 +263,8 @@ static void plperl_event_trigger_handler(PG_FUNCTION_ARGS);
static void free_plperl_function(plperl_proc_desc *prodesc);
static plperl_proc_desc *compile_plperl_function(Oid fn_oid,
- bool is_trigger,
- bool is_event_trigger);
+ bool is_trigger,
+ bool is_event_trigger);
static SV *plperl_hash_from_tuple(HeapTuple tuple, TupleDesc tupdesc, bool include_generated);
static SV *plperl_hash_from_datum(Datum attr);
@@ -273,15 +273,15 @@ static SV *split_array(plperl_array_info *info, int first, int last, int nest);
static SV *make_array_ref(plperl_array_info *info, int first, int last);
static SV *get_perl_array_ref(SV *sv);
static Datum plperl_sv_to_datum(SV *sv, Oid typid, int32 typmod,
- FunctionCallInfo fcinfo,
- FmgrInfo *finfo, Oid typioparam,
- bool *isnull);
+ FunctionCallInfo fcinfo,
+ FmgrInfo *finfo, Oid typioparam,
+ bool *isnull);
static void _sv_to_datum_finfo(Oid typid, FmgrInfo *finfo, Oid *typioparam);
static Datum plperl_array_to_datum(SV *src, Oid typid, int32 typmod);
static void array_to_datum_internal(AV *av, ArrayBuildState *astate,
- int *ndims, int *dims, int cur_depth,
- Oid arraytypid, Oid elemtypid, int32 typmod,
- FmgrInfo *finfo, Oid typioparam);
+ int *ndims, int *dims, int cur_depth,
+ Oid arraytypid, Oid elemtypid, int32 typmod,
+ FmgrInfo *finfo, Oid typioparam);
static Datum plperl_hash_to_datum(SV *src, TupleDesc td);
static void plperl_init_shared_libs(pTHX);
@@ -294,7 +294,7 @@ static SV **hv_store_string(HV *hv, const char *key, SV *val);
static SV **hv_fetch_string(HV *hv, const char *key);
static void plperl_create_sub(plperl_proc_desc *desc, const char *s, Oid fn_oid);
static SV *plperl_call_perl_func(plperl_proc_desc *desc,
- FunctionCallInfo fcinfo);
+ FunctionCallInfo fcinfo);
static void plperl_compile_callback(void *arg);
static void plperl_exec_callback(void *arg);
static void plperl_inline_callback(void *arg);
diff --git a/src/pl/plpgsql/src/pl_comp.c b/src/pl/plpgsql/src/pl_comp.c
index 3b8e137ab58..6a3b2986a11 100644
--- a/src/pl/plpgsql/src/pl_comp.c
+++ b/src/pl/plpgsql/src/pl_comp.c
@@ -91,10 +91,10 @@ static const ExceptionLabelMap exception_label_map[] = {
* ----------
*/
static PLpgSQL_function *do_compile(FunctionCallInfo fcinfo,
- HeapTuple procTup,
- PLpgSQL_function *function,
- PLpgSQL_func_hashkey *hashkey,
- bool forValidator);
+ HeapTuple procTup,
+ PLpgSQL_function *function,
+ PLpgSQL_func_hashkey *hashkey,
+ bool forValidator);
static void plpgsql_compile_error_callback(void *arg);
static void add_parameter_name(PLpgSQL_nsitem_type itemtype, int itemno, const char *name);
static void add_dummy_return(PLpgSQL_function *function);
@@ -102,23 +102,23 @@ static Node *plpgsql_pre_column_ref(ParseState *pstate, ColumnRef *cref);
static Node *plpgsql_post_column_ref(ParseState *pstate, ColumnRef *cref, Node *var);
static Node *plpgsql_param_ref(ParseState *pstate, ParamRef *pref);
static Node *resolve_column_ref(ParseState *pstate, PLpgSQL_expr *expr,
- ColumnRef *cref, bool error_if_no_field);
+ ColumnRef *cref, bool error_if_no_field);
static Node *make_datum_param(PLpgSQL_expr *expr, int dno, int location);
static PLpgSQL_row *build_row_from_vars(PLpgSQL_variable **vars, int numvars);
static PLpgSQL_type *build_datatype(HeapTuple typeTup, int32 typmod, Oid collation);
static void plpgsql_start_datums(void);
static void plpgsql_finish_datums(PLpgSQL_function *function);
static void compute_function_hashkey(FunctionCallInfo fcinfo,
- Form_pg_proc procStruct,
- PLpgSQL_func_hashkey *hashkey,
- bool forValidator);
+ Form_pg_proc procStruct,
+ PLpgSQL_func_hashkey *hashkey,
+ bool forValidator);
static void plpgsql_resolve_polymorphic_argtypes(int numargs,
- Oid *argtypes, char *argmodes,
- Node *call_expr, bool forValidator,
- const char *proname);
+ Oid *argtypes, char *argmodes,
+ Node *call_expr, bool forValidator,
+ const char *proname);
static PLpgSQL_function *plpgsql_HashTableLookup(PLpgSQL_func_hashkey *func_key);
static void plpgsql_HashTableInsert(PLpgSQL_function *function,
- PLpgSQL_func_hashkey *func_key);
+ PLpgSQL_func_hashkey *func_key);
static void plpgsql_HashTableDelete(PLpgSQL_function *function);
static void delete_function(PLpgSQL_function *func);
diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c
index bb2249b81e8..a5d1d1db3d8 100644
--- a/src/pl/plpgsql/src/pl_exec.c
+++ b/src/pl/plpgsql/src/pl_exec.c
@@ -239,197 +239,197 @@ static HTAB *shared_cast_hash = NULL;
* Local function forward declarations
************************************************************/
static void coerce_function_result_tuple(PLpgSQL_execstate *estate,
- TupleDesc tupdesc);
+ TupleDesc tupdesc);
static void plpgsql_exec_error_callback(void *arg);
static void copy_plpgsql_datums(PLpgSQL_execstate *estate,
- PLpgSQL_function *func);
+ PLpgSQL_function *func);
static void plpgsql_fulfill_promise(PLpgSQL_execstate *estate,
- PLpgSQL_var *var);
+ PLpgSQL_var *var);
static MemoryContext get_stmt_mcontext(PLpgSQL_execstate *estate);
static void push_stmt_mcontext(PLpgSQL_execstate *estate);
static void pop_stmt_mcontext(PLpgSQL_execstate *estate);
-static int exec_stmt_block(PLpgSQL_execstate *estate,
- PLpgSQL_stmt_block *block);
-static int exec_stmts(PLpgSQL_execstate *estate,
- List *stmts);
-static int exec_stmt(PLpgSQL_execstate *estate,
- PLpgSQL_stmt *stmt);
-static int exec_stmt_assign(PLpgSQL_execstate *estate,
- PLpgSQL_stmt_assign *stmt);
-static int exec_stmt_perform(PLpgSQL_execstate *estate,
- PLpgSQL_stmt_perform *stmt);
-static int exec_stmt_call(PLpgSQL_execstate *estate,
- PLpgSQL_stmt_call *stmt);
-static int exec_stmt_getdiag(PLpgSQL_execstate *estate,
- PLpgSQL_stmt_getdiag *stmt);
-static int exec_stmt_if(PLpgSQL_execstate *estate,
- PLpgSQL_stmt_if *stmt);
-static int exec_stmt_case(PLpgSQL_execstate *estate,
- PLpgSQL_stmt_case *stmt);
-static int exec_stmt_loop(PLpgSQL_execstate *estate,
- PLpgSQL_stmt_loop *stmt);
-static int exec_stmt_while(PLpgSQL_execstate *estate,
- PLpgSQL_stmt_while *stmt);
-static int exec_stmt_fori(PLpgSQL_execstate *estate,
- PLpgSQL_stmt_fori *stmt);
-static int exec_stmt_fors(PLpgSQL_execstate *estate,
- PLpgSQL_stmt_fors *stmt);
-static int exec_stmt_forc(PLpgSQL_execstate *estate,
- PLpgSQL_stmt_forc *stmt);
-static int exec_stmt_foreach_a(PLpgSQL_execstate *estate,
- PLpgSQL_stmt_foreach_a *stmt);
-static int exec_stmt_open(PLpgSQL_execstate *estate,
- PLpgSQL_stmt_open *stmt);
-static int exec_stmt_fetch(PLpgSQL_execstate *estate,
- PLpgSQL_stmt_fetch *stmt);
-static int exec_stmt_close(PLpgSQL_execstate *estate,
- PLpgSQL_stmt_close *stmt);
-static int exec_stmt_exit(PLpgSQL_execstate *estate,
- PLpgSQL_stmt_exit *stmt);
-static int exec_stmt_return(PLpgSQL_execstate *estate,
- PLpgSQL_stmt_return *stmt);
-static int exec_stmt_return_next(PLpgSQL_execstate *estate,
- PLpgSQL_stmt_return_next *stmt);
-static int exec_stmt_return_query(PLpgSQL_execstate *estate,
- PLpgSQL_stmt_return_query *stmt);
-static int exec_stmt_raise(PLpgSQL_execstate *estate,
- PLpgSQL_stmt_raise *stmt);
-static int exec_stmt_assert(PLpgSQL_execstate *estate,
- PLpgSQL_stmt_assert *stmt);
-static int exec_stmt_execsql(PLpgSQL_execstate *estate,
- PLpgSQL_stmt_execsql *stmt);
-static int exec_stmt_dynexecute(PLpgSQL_execstate *estate,
- PLpgSQL_stmt_dynexecute *stmt);
-static int exec_stmt_dynfors(PLpgSQL_execstate *estate,
- PLpgSQL_stmt_dynfors *stmt);
-static int exec_stmt_commit(PLpgSQL_execstate *estate,
- PLpgSQL_stmt_commit *stmt);
-static int exec_stmt_rollback(PLpgSQL_execstate *estate,
- PLpgSQL_stmt_rollback *stmt);
-static int exec_stmt_set(PLpgSQL_execstate *estate,
- PLpgSQL_stmt_set *stmt);
+static int exec_stmt_block(PLpgSQL_execstate *estate,
+ PLpgSQL_stmt_block *block);
+static int exec_stmts(PLpgSQL_execstate *estate,
+ List *stmts);
+static int exec_stmt(PLpgSQL_execstate *estate,
+ PLpgSQL_stmt *stmt);
+static int exec_stmt_assign(PLpgSQL_execstate *estate,
+ PLpgSQL_stmt_assign *stmt);
+static int exec_stmt_perform(PLpgSQL_execstate *estate,
+ PLpgSQL_stmt_perform *stmt);
+static int exec_stmt_call(PLpgSQL_execstate *estate,
+ PLpgSQL_stmt_call *stmt);
+static int exec_stmt_getdiag(PLpgSQL_execstate *estate,
+ PLpgSQL_stmt_getdiag *stmt);
+static int exec_stmt_if(PLpgSQL_execstate *estate,
+ PLpgSQL_stmt_if *stmt);
+static int exec_stmt_case(PLpgSQL_execstate *estate,
+ PLpgSQL_stmt_case *stmt);
+static int exec_stmt_loop(PLpgSQL_execstate *estate,
+ PLpgSQL_stmt_loop *stmt);
+static int exec_stmt_while(PLpgSQL_execstate *estate,
+ PLpgSQL_stmt_while *stmt);
+static int exec_stmt_fori(PLpgSQL_execstate *estate,
+ PLpgSQL_stmt_fori *stmt);
+static int exec_stmt_fors(PLpgSQL_execstate *estate,
+ PLpgSQL_stmt_fors *stmt);
+static int exec_stmt_forc(PLpgSQL_execstate *estate,
+ PLpgSQL_stmt_forc *stmt);
+static int exec_stmt_foreach_a(PLpgSQL_execstate *estate,
+ PLpgSQL_stmt_foreach_a *stmt);
+static int exec_stmt_open(PLpgSQL_execstate *estate,
+ PLpgSQL_stmt_open *stmt);
+static int exec_stmt_fetch(PLpgSQL_execstate *estate,
+ PLpgSQL_stmt_fetch *stmt);
+static int exec_stmt_close(PLpgSQL_execstate *estate,
+ PLpgSQL_stmt_close *stmt);
+static int exec_stmt_exit(PLpgSQL_execstate *estate,
+ PLpgSQL_stmt_exit *stmt);
+static int exec_stmt_return(PLpgSQL_execstate *estate,
+ PLpgSQL_stmt_return *stmt);
+static int exec_stmt_return_next(PLpgSQL_execstate *estate,
+ PLpgSQL_stmt_return_next *stmt);
+static int exec_stmt_return_query(PLpgSQL_execstate *estate,
+ PLpgSQL_stmt_return_query *stmt);
+static int exec_stmt_raise(PLpgSQL_execstate *estate,
+ PLpgSQL_stmt_raise *stmt);
+static int exec_stmt_assert(PLpgSQL_execstate *estate,
+ PLpgSQL_stmt_assert *stmt);
+static int exec_stmt_execsql(PLpgSQL_execstate *estate,
+ PLpgSQL_stmt_execsql *stmt);
+static int exec_stmt_dynexecute(PLpgSQL_execstate *estate,
+ PLpgSQL_stmt_dynexecute *stmt);
+static int exec_stmt_dynfors(PLpgSQL_execstate *estate,
+ PLpgSQL_stmt_dynfors *stmt);
+static int exec_stmt_commit(PLpgSQL_execstate *estate,
+ PLpgSQL_stmt_commit *stmt);
+static int exec_stmt_rollback(PLpgSQL_execstate *estate,
+ PLpgSQL_stmt_rollback *stmt);
+static int exec_stmt_set(PLpgSQL_execstate *estate,
+ PLpgSQL_stmt_set *stmt);
static void plpgsql_estate_setup(PLpgSQL_execstate *estate,
- PLpgSQL_function *func,
- ReturnSetInfo *rsi,
- EState *simple_eval_estate);
+ PLpgSQL_function *func,
+ ReturnSetInfo *rsi,
+ EState *simple_eval_estate);
static void exec_eval_cleanup(PLpgSQL_execstate *estate);
static void exec_prepare_plan(PLpgSQL_execstate *estate,
- PLpgSQL_expr *expr, int cursorOptions,
- bool keepplan);
+ PLpgSQL_expr *expr, int cursorOptions,
+ bool keepplan);
static void exec_simple_check_plan(PLpgSQL_execstate *estate, PLpgSQL_expr *expr);
static void exec_save_simple_expr(PLpgSQL_expr *expr, CachedPlan *cplan);
static void exec_check_rw_parameter(PLpgSQL_expr *expr, int target_dno);
static bool contains_target_param(Node *node, int *target_dno);
static bool exec_eval_simple_expr(PLpgSQL_execstate *estate,
- PLpgSQL_expr *expr,
- Datum *result,
- bool *isNull,
- Oid *rettype,
- int32 *rettypmod);
+ PLpgSQL_expr *expr,
+ Datum *result,
+ bool *isNull,
+ Oid *rettype,
+ int32 *rettypmod);
static void exec_assign_expr(PLpgSQL_execstate *estate,
- PLpgSQL_datum *target,
- PLpgSQL_expr *expr);
+ PLpgSQL_datum *target,
+ PLpgSQL_expr *expr);
static void exec_assign_c_string(PLpgSQL_execstate *estate,
- PLpgSQL_datum *target,
- const char *str);
+ PLpgSQL_datum *target,
+ const char *str);
static void exec_assign_value(PLpgSQL_execstate *estate,
- PLpgSQL_datum *target,
- Datum value, bool isNull,
- Oid valtype, int32 valtypmod);
+ PLpgSQL_datum *target,
+ Datum value, bool isNull,
+ Oid valtype, int32 valtypmod);
static void exec_eval_datum(PLpgSQL_execstate *estate,
- PLpgSQL_datum *datum,
- Oid *typeid,
- int32 *typetypmod,
- Datum *value,
- bool *isnull);
-static int exec_eval_integer(PLpgSQL_execstate *estate,
- PLpgSQL_expr *expr,
- bool *isNull);
+ PLpgSQL_datum *datum,
+ Oid *typeid,
+ int32 *typetypmod,
+ Datum *value,
+ bool *isnull);
+static int exec_eval_integer(PLpgSQL_execstate *estate,
+ PLpgSQL_expr *expr,
+ bool *isNull);
static bool exec_eval_boolean(PLpgSQL_execstate *estate,
- PLpgSQL_expr *expr,
- bool *isNull);
+ PLpgSQL_expr *expr,
+ bool *isNull);
static Datum exec_eval_expr(PLpgSQL_execstate *estate,
- PLpgSQL_expr *expr,
- bool *isNull,
- Oid *rettype,
- int32 *rettypmod);
-static int exec_run_select(PLpgSQL_execstate *estate,
- PLpgSQL_expr *expr, long maxtuples, Portal *portalP);
-static int exec_for_query(PLpgSQL_execstate *estate, PLpgSQL_stmt_forq *stmt,
- Portal portal, bool prefetch_ok);
+ PLpgSQL_expr *expr,
+ bool *isNull,
+ Oid *rettype,
+ int32 *rettypmod);
+static int exec_run_select(PLpgSQL_execstate *estate,
+ PLpgSQL_expr *expr, long maxtuples, Portal *portalP);
+static int exec_for_query(PLpgSQL_execstate *estate, PLpgSQL_stmt_forq *stmt,
+ Portal portal, bool prefetch_ok);
static ParamListInfo setup_param_list(PLpgSQL_execstate *estate,
- PLpgSQL_expr *expr);
+ PLpgSQL_expr *expr);
static ParamExternData *plpgsql_param_fetch(ParamListInfo params,
- int paramid, bool speculative,
- ParamExternData *workspace);
+ int paramid, bool speculative,
+ ParamExternData *workspace);
static void plpgsql_param_compile(ParamListInfo params, Param *param,
- ExprState *state,
- Datum *resv, bool *resnull);
+ ExprState *state,
+ Datum *resv, bool *resnull);
static void plpgsql_param_eval_var(ExprState *state, ExprEvalStep *op,
- ExprContext *econtext);
+ ExprContext *econtext);
static void plpgsql_param_eval_var_ro(ExprState *state, ExprEvalStep *op,
- ExprContext *econtext);
+ ExprContext *econtext);
static void plpgsql_param_eval_recfield(ExprState *state, ExprEvalStep *op,
- ExprContext *econtext);
+ ExprContext *econtext);
static void plpgsql_param_eval_generic(ExprState *state, ExprEvalStep *op,
- ExprContext *econtext);
+ ExprContext *econtext);
static void plpgsql_param_eval_generic_ro(ExprState *state, ExprEvalStep *op,
- ExprContext *econtext);
+ ExprContext *econtext);
static void exec_move_row(PLpgSQL_execstate *estate,
- PLpgSQL_variable *target,
- HeapTuple tup, TupleDesc tupdesc);
+ PLpgSQL_variable *target,
+ HeapTuple tup, TupleDesc tupdesc);
static ExpandedRecordHeader *make_expanded_record_for_rec(PLpgSQL_execstate *estate,
- PLpgSQL_rec *rec,
- TupleDesc srctupdesc,
- ExpandedRecordHeader *srcerh);
+ PLpgSQL_rec *rec,
+ TupleDesc srctupdesc,
+ ExpandedRecordHeader *srcerh);
static void exec_move_row_from_fields(PLpgSQL_execstate *estate,
- PLpgSQL_variable *target,
- ExpandedRecordHeader *newerh,
- Datum *values, bool *nulls,
- TupleDesc tupdesc);
+ PLpgSQL_variable *target,
+ ExpandedRecordHeader *newerh,
+ Datum *values, bool *nulls,
+ TupleDesc tupdesc);
static bool compatible_tupdescs(TupleDesc src_tupdesc, TupleDesc dst_tupdesc);
static HeapTuple make_tuple_from_row(PLpgSQL_execstate *estate,
- PLpgSQL_row *row,
- TupleDesc tupdesc);
+ PLpgSQL_row *row,
+ TupleDesc tupdesc);
static TupleDesc deconstruct_composite_datum(Datum value,
- HeapTupleData *tmptup);
+ HeapTupleData *tmptup);
static void exec_move_row_from_datum(PLpgSQL_execstate *estate,
- PLpgSQL_variable *target,
- Datum value);
+ PLpgSQL_variable *target,
+ Datum value);
static void instantiate_empty_record_variable(PLpgSQL_execstate *estate,
- PLpgSQL_rec *rec);
+ PLpgSQL_rec *rec);
static char *convert_value_to_string(PLpgSQL_execstate *estate,
- Datum value, Oid valtype);
+ Datum value, Oid valtype);
static Datum exec_cast_value(PLpgSQL_execstate *estate,
- Datum value, bool *isnull,
- Oid valtype, int32 valtypmod,
- Oid reqtype, int32 reqtypmod);
+ Datum value, bool *isnull,
+ Oid valtype, int32 valtypmod,
+ Oid reqtype, int32 reqtypmod);
static plpgsql_CastHashEntry *get_cast_hashentry(PLpgSQL_execstate *estate,
- Oid srctype, int32 srctypmod,
- Oid dsttype, int32 dsttypmod);
+ Oid srctype, int32 srctypmod,
+ Oid dsttype, int32 dsttypmod);
static void exec_init_tuple_store(PLpgSQL_execstate *estate);
static void exec_set_found(PLpgSQL_execstate *estate, bool state);
static void plpgsql_create_econtext(PLpgSQL_execstate *estate);
static void plpgsql_destroy_econtext(PLpgSQL_execstate *estate);
static void assign_simple_var(PLpgSQL_execstate *estate, PLpgSQL_var *var,
- Datum newvalue, bool isnull, bool freeable);
+ Datum newvalue, bool isnull, bool freeable);
static void assign_text_var(PLpgSQL_execstate *estate, PLpgSQL_var *var,
- const char *str);
+ const char *str);
static void assign_record_var(PLpgSQL_execstate *estate, PLpgSQL_rec *rec,
- ExpandedRecordHeader *erh);
+ ExpandedRecordHeader *erh);
static PreparedParamsData *exec_eval_using_params(PLpgSQL_execstate *estate,
- List *params);
+ List *params);
static Portal exec_dynquery_with_params(PLpgSQL_execstate *estate,
- PLpgSQL_expr *dynquery, List *params,
- const char *portalname, int cursorOptions);
+ PLpgSQL_expr *dynquery, List *params,
+ const char *portalname, int cursorOptions);
static char *format_expr_params(PLpgSQL_execstate *estate,
- const PLpgSQL_expr *expr);
+ const PLpgSQL_expr *expr);
static char *format_preparedparamsdata(PLpgSQL_execstate *estate,
- const PreparedParamsData *ppd);
+ const PreparedParamsData *ppd);
/* ----------
diff --git a/src/pl/plpgsql/src/plpgsql.h b/src/pl/plpgsql/src/plpgsql.h
index a72e319e55f..921ed72bdcd 100644
--- a/src/pl/plpgsql/src/plpgsql.h
+++ b/src/pl/plpgsql/src/plpgsql.h
@@ -1212,32 +1212,32 @@ extern PLpgSQL_plugin **plpgsql_plugin_ptr;
* Functions in pl_comp.c
*/
extern PLpgSQL_function *plpgsql_compile(FunctionCallInfo fcinfo,
- bool forValidator);
+ bool forValidator);
extern PLpgSQL_function *plpgsql_compile_inline(char *proc_source);
extern void plpgsql_parser_setup(struct ParseState *pstate,
- PLpgSQL_expr *expr);
+ PLpgSQL_expr *expr);
extern bool plpgsql_parse_word(char *word1, const char *yytxt, bool lookup,
- PLwdatum *wdatum, PLword *word);
+ PLwdatum *wdatum, PLword *word);
extern bool plpgsql_parse_dblword(char *word1, char *word2,
- PLwdatum *wdatum, PLcword *cword);
+ PLwdatum *wdatum, PLcword *cword);
extern bool plpgsql_parse_tripword(char *word1, char *word2, char *word3,
- PLwdatum *wdatum, PLcword *cword);
+ PLwdatum *wdatum, PLcword *cword);
extern PLpgSQL_type *plpgsql_parse_wordtype(char *ident);
extern PLpgSQL_type *plpgsql_parse_cwordtype(List *idents);
extern PLpgSQL_type *plpgsql_parse_wordrowtype(char *ident);
extern PLpgSQL_type *plpgsql_parse_cwordrowtype(List *idents);
extern PLpgSQL_type *plpgsql_build_datatype(Oid typeOid, int32 typmod,
- Oid collation);
+ Oid collation);
extern PLpgSQL_variable *plpgsql_build_variable(const char *refname, int lineno,
- PLpgSQL_type *dtype,
- bool add2namespace);
+ PLpgSQL_type *dtype,
+ bool add2namespace);
extern PLpgSQL_rec *plpgsql_build_record(const char *refname, int lineno,
- PLpgSQL_type *dtype, Oid rectypeid,
- bool add2namespace);
+ PLpgSQL_type *dtype, Oid rectypeid,
+ bool add2namespace);
extern PLpgSQL_recfield *plpgsql_build_recfield(PLpgSQL_rec *rec,
- const char *fldname);
-extern int plpgsql_recognize_err_condition(const char *condname,
- bool allow_sqlstate);
+ const char *fldname);
+extern int plpgsql_recognize_err_condition(const char *condname,
+ bool allow_sqlstate);
extern PLpgSQL_condition *plpgsql_parse_err_condition(char *condname);
extern void plpgsql_adddatum(PLpgSQL_datum *new);
extern int plpgsql_add_initdatums(int **varnos);
@@ -1252,36 +1252,36 @@ extern void _PG_init(void);
* Functions in pl_exec.c
*/
extern Datum plpgsql_exec_function(PLpgSQL_function *func,
- FunctionCallInfo fcinfo,
- EState *simple_eval_estate,
- bool atomic);
+ FunctionCallInfo fcinfo,
+ EState *simple_eval_estate,
+ bool atomic);
extern HeapTuple plpgsql_exec_trigger(PLpgSQL_function *func,
- TriggerData *trigdata);
+ TriggerData *trigdata);
extern void plpgsql_exec_event_trigger(PLpgSQL_function *func,
- EventTriggerData *trigdata);
+ EventTriggerData *trigdata);
extern void plpgsql_xact_cb(XactEvent event, void *arg);
extern void plpgsql_subxact_cb(SubXactEvent event, SubTransactionId mySubid,
- SubTransactionId parentSubid, void *arg);
-extern Oid plpgsql_exec_get_datum_type(PLpgSQL_execstate *estate,
- PLpgSQL_datum *datum);
+ SubTransactionId parentSubid, void *arg);
+extern Oid plpgsql_exec_get_datum_type(PLpgSQL_execstate *estate,
+ PLpgSQL_datum *datum);
extern void plpgsql_exec_get_datum_type_info(PLpgSQL_execstate *estate,
- PLpgSQL_datum *datum,
- Oid *typeid, int32 *typmod, Oid *collation);
+ PLpgSQL_datum *datum,
+ Oid *typeid, int32 *typmod, Oid *collation);
/*
* Functions for namespace handling in pl_funcs.c
*/
extern void plpgsql_ns_init(void);
extern void plpgsql_ns_push(const char *label,
- PLpgSQL_label_type label_type);
+ PLpgSQL_label_type label_type);
extern void plpgsql_ns_pop(void);
extern PLpgSQL_nsitem *plpgsql_ns_top(void);
extern void plpgsql_ns_additem(PLpgSQL_nsitem_type itemtype, int itemno, const char *name);
extern PLpgSQL_nsitem *plpgsql_ns_lookup(PLpgSQL_nsitem *ns_cur, bool localmode,
- const char *name1, const char *name2,
- const char *name3, int *names_used);
+ const char *name1, const char *name2,
+ const char *name3, int *names_used);
extern PLpgSQL_nsitem *plpgsql_ns_lookup_label(PLpgSQL_nsitem *ns_cur,
- const char *name);
+ const char *name);
extern PLpgSQL_nsitem *plpgsql_ns_find_nearest_loop(PLpgSQL_nsitem *ns_cur);
/*
@@ -1300,10 +1300,10 @@ extern int plpgsql_yylex(void);
extern void plpgsql_push_back_token(int token);
extern bool plpgsql_token_is_unreserved_keyword(int token);
extern void plpgsql_append_source_text(StringInfo buf,
- int startlocation, int endlocation);
+ int startlocation, int endlocation);
extern int plpgsql_peek(void);
extern void plpgsql_peek2(int *tok1_p, int *tok2_p, int *tok1_loc,
- int *tok2_loc);
+ int *tok2_loc);
extern int plpgsql_scanner_errposition(int location);
extern void plpgsql_yyerror(const char *message) pg_attribute_noreturn();
extern int plpgsql_location_to_lineno(int location);
diff --git a/src/pl/plpython/plpy_elog.c b/src/pl/plpython/plpy_elog.c
index ec7e624e101..25930f99d78 100644
--- a/src/pl/plpython/plpy_elog.c
+++ b/src/pl/plpython/plpy_elog.c
@@ -22,14 +22,14 @@ PyObject *PLy_exc_spi_error = NULL;
static void PLy_traceback(PyObject *e, PyObject *v, PyObject *tb,
- char **xmsg, char **tbmsg, int *tb_depth);
+ char **xmsg, char **tbmsg, int *tb_depth);
static void PLy_get_spi_error_data(PyObject *exc, int *sqlerrcode, char **detail,
- char **hint, char **query, int *position,
- char **schema_name, char **table_name, char **column_name,
- char **datatype_name, char **constraint_name);
+ char **hint, char **query, int *position,
+ char **schema_name, char **table_name, char **column_name,
+ char **datatype_name, char **constraint_name);
static void PLy_get_error_data(PyObject *exc, int *sqlerrcode, char **detail,
- char **hint, char **schema_name, char **table_name, char **column_name,
- char **datatype_name, char **constraint_name);
+ char **hint, char **schema_name, char **table_name, char **column_name,
+ char **datatype_name, char **constraint_name);
static char *get_source_line(const char *src, int lineno);
static void get_string_attr(PyObject *obj, char *attrname, char **str);
diff --git a/src/pl/plpython/plpy_elog.h b/src/pl/plpython/plpy_elog.h
index b56ac412476..967df784652 100644
--- a/src/pl/plpython/plpy_elog.h
+++ b/src/pl/plpython/plpy_elog.h
@@ -37,7 +37,7 @@ extern void PLy_elog_impl(int elevel, const char *fmt,...) pg_attribute_printf(2
extern void PLy_exception_set(PyObject *exc, const char *fmt,...) pg_attribute_printf(2, 3);
extern void PLy_exception_set_plural(PyObject *exc, const char *fmt_singular, const char *fmt_plural,
- unsigned long n,...) pg_attribute_printf(2, 5) pg_attribute_printf(3, 5);
+ unsigned long n,...) pg_attribute_printf(2, 5) pg_attribute_printf(3, 5);
extern void PLy_exception_set_with_details(PyObject *excclass, ErrorData *edata);
diff --git a/src/pl/plpython/plpy_exec.c b/src/pl/plpython/plpy_exec.c
index c0c3ae9df0e..920322e912b 100644
--- a/src/pl/plpython/plpy_exec.c
+++ b/src/pl/plpython/plpy_exec.c
@@ -45,9 +45,9 @@ static void plpython_srf_cleanup_callback(void *arg);
static void plpython_return_error_callback(void *arg);
static PyObject *PLy_trigger_build_args(FunctionCallInfo fcinfo, PLyProcedure *proc,
- HeapTuple *rv);
+ HeapTuple *rv);
static HeapTuple PLy_modify_tuple(PLyProcedure *proc, PyObject *pltd,
- TriggerData *tdata, HeapTuple otup);
+ TriggerData *tdata, HeapTuple otup);
static void plpython_trigger_error_callback(void *arg);
static PyObject *PLy_procedure_call(PLyProcedure *proc, const char *kargs, PyObject *vargs);
diff --git a/src/pl/plpython/plpy_plpymodule.c b/src/pl/plpython/plpy_plpymodule.c
index f40f0846bbc..c80b35040bf 100644
--- a/src/pl/plpython/plpy_plpymodule.c
+++ b/src/pl/plpython/plpy_plpymodule.c
@@ -29,8 +29,8 @@ HTAB *PLy_spi_exceptions = NULL;
static void PLy_add_exceptions(PyObject *plpy);
static PyObject *PLy_create_exception(char *name,
- PyObject *base, PyObject *dict,
- const char *modname, PyObject *mod);
+ PyObject *base, PyObject *dict,
+ const char *modname, PyObject *mod);
static void PLy_generate_spi_exceptions(PyObject *mod, PyObject *base);
/* module functions */
@@ -298,7 +298,7 @@ PLy_generate_spi_exceptions(PyObject *mod, PyObject *base)
* don't confuse these with PLy_elog
*/
static PyObject *PLy_output(volatile int level, PyObject *self,
- PyObject *args, PyObject *kw);
+ PyObject *args, PyObject *kw);
static PyObject *
PLy_debug(PyObject *self, PyObject *args, PyObject *kw)
diff --git a/src/pl/plpython/plpy_spi.c b/src/pl/plpython/plpy_spi.c
index fb23a7b3a45..2fe435d42b0 100644
--- a/src/pl/plpython/plpy_spi.c
+++ b/src/pl/plpython/plpy_spi.c
@@ -31,7 +31,7 @@
static PyObject *PLy_spi_execute_query(char *query, long limit);
static PyObject *PLy_spi_execute_fetch_result(SPITupleTable *tuptable,
- uint64 rows, int status);
+ uint64 rows, int status);
static void PLy_spi_exception_set(PyObject *excclass, ErrorData *edata);
diff --git a/src/pl/plpython/plpy_typeio.c b/src/pl/plpython/plpy_typeio.c
index 6365e461e92..371e534fd22 100644
--- a/src/pl/plpython/plpy_typeio.c
+++ b/src/pl/plpython/plpy_typeio.c
@@ -39,28 +39,28 @@ static PyObject *PLyString_FromScalar(PLyDatumToOb *arg, Datum d);
static PyObject *PLyObject_FromTransform(PLyDatumToOb *arg, Datum d);
static PyObject *PLyList_FromArray(PLyDatumToOb *arg, Datum d);
static PyObject *PLyList_FromArray_recurse(PLyDatumToOb *elm, int *dims, int ndim, int dim,
- char **dataptr_p, bits8 **bitmap_p, int *bitmask_p);
+ char **dataptr_p, bits8 **bitmap_p, int *bitmask_p);
static PyObject *PLyDict_FromComposite(PLyDatumToOb *arg, Datum d);
static PyObject *PLyDict_FromTuple(PLyDatumToOb *arg, HeapTuple tuple, TupleDesc desc, bool include_generated);
/* conversion from Python objects to Datums */
static Datum PLyObject_ToBool(PLyObToDatum *arg, PyObject *plrv,
- bool *isnull, bool inarray);
+ bool *isnull, bool inarray);
static Datum PLyObject_ToBytea(PLyObToDatum *arg, PyObject *plrv,
- bool *isnull, bool inarray);
+ bool *isnull, bool inarray);
static Datum PLyObject_ToComposite(PLyObToDatum *arg, PyObject *plrv,
- bool *isnull, bool inarray);
+ bool *isnull, bool inarray);
static Datum PLyObject_ToScalar(PLyObToDatum *arg, PyObject *plrv,
- bool *isnull, bool inarray);
+ bool *isnull, bool inarray);
static Datum PLyObject_ToDomain(PLyObToDatum *arg, PyObject *plrv,
- bool *isnull, bool inarray);
+ bool *isnull, bool inarray);
static Datum PLyObject_ToTransform(PLyObToDatum *arg, PyObject *plrv,
- bool *isnull, bool inarray);
+ bool *isnull, bool inarray);
static Datum PLySequence_ToArray(PLyObToDatum *arg, PyObject *plrv,
- bool *isnull, bool inarray);
+ bool *isnull, bool inarray);
static void PLySequence_ToArray_recurse(PLyObToDatum *elm, PyObject *list,
- int *dims, int ndim, int dim,
- Datum *elems, bool *nulls, int *currelem);
+ int *dims, int ndim, int dim,
+ Datum *elems, bool *nulls, int *currelem);
/* conversion from Python objects to composite Datums */
static Datum PLyString_ToComposite(PLyObToDatum *arg, PyObject *string, bool inarray);
diff --git a/src/pl/plpython/plpy_typeio.h b/src/pl/plpython/plpy_typeio.h
index f210178238f..64c72fa4785 100644
--- a/src/pl/plpython/plpy_typeio.h
+++ b/src/pl/plpython/plpy_typeio.h
@@ -148,25 +148,25 @@ struct PLyObToDatum
extern PyObject *PLy_input_convert(PLyDatumToOb *arg, Datum val);
extern Datum PLy_output_convert(PLyObToDatum *arg, PyObject *val,
- bool *isnull);
+ bool *isnull);
extern PyObject *PLy_input_from_tuple(PLyDatumToOb *arg, HeapTuple tuple,
- TupleDesc desc, bool include_generated);
+ TupleDesc desc, bool include_generated);
extern void PLy_input_setup_func(PLyDatumToOb *arg, MemoryContext arg_mcxt,
- Oid typeOid, int32 typmod,
- struct PLyProcedure *proc);
+ Oid typeOid, int32 typmod,
+ struct PLyProcedure *proc);
extern void PLy_output_setup_func(PLyObToDatum *arg, MemoryContext arg_mcxt,
- Oid typeOid, int32 typmod,
- struct PLyProcedure *proc);
+ Oid typeOid, int32 typmod,
+ struct PLyProcedure *proc);
extern void PLy_input_setup_tuple(PLyDatumToOb *arg, TupleDesc desc,
- struct PLyProcedure *proc);
+ struct PLyProcedure *proc);
extern void PLy_output_setup_tuple(PLyObToDatum *arg, TupleDesc desc,
- struct PLyProcedure *proc);
+ struct PLyProcedure *proc);
extern void PLy_output_setup_record(PLyObToDatum *arg, TupleDesc desc,
- struct PLyProcedure *proc);
+ struct PLyProcedure *proc);
/* conversion from Python objects to C strings --- exported for transforms */
extern char *PLyObject_AsString(PyObject *plrv);
diff --git a/src/pl/tcl/pltcl.c b/src/pl/tcl/pltcl.c
index db8ca6abd71..eecd2032d87 100644
--- a/src/pl/tcl/pltcl.c
+++ b/src/pl/tcl/pltcl.c
@@ -263,7 +263,7 @@ static const TclExceptionNameMap exception_name_map[] = {
void _PG_init(void);
static void pltcl_init_interp(pltcl_interp_desc *interp_desc,
- Oid prolang, bool pltrusted);
+ Oid prolang, bool pltrusted);
static pltcl_interp_desc *pltcl_fetch_interp(Oid prolang, bool pltrusted);
static void call_pltcl_start_proc(Oid prolang, bool pltrusted);
static void start_proc_error_callback(void *arg);
@@ -271,63 +271,63 @@ static void start_proc_error_callback(void *arg);
static Datum pltcl_handler(PG_FUNCTION_ARGS, bool pltrusted);
static Datum pltcl_func_handler(PG_FUNCTION_ARGS, pltcl_call_state *call_state,
- bool pltrusted);
+ bool pltrusted);
static HeapTuple pltcl_trigger_handler(PG_FUNCTION_ARGS, pltcl_call_state *call_state,
- bool pltrusted);
+ bool pltrusted);
static void pltcl_event_trigger_handler(PG_FUNCTION_ARGS, pltcl_call_state *call_state,
- bool pltrusted);
+ bool pltrusted);
static void throw_tcl_error(Tcl_Interp *interp, const char *proname);
static pltcl_proc_desc *compile_pltcl_function(Oid fn_oid, Oid tgreloid,
- bool is_event_trigger,
- bool pltrusted);
+ bool is_event_trigger,
+ bool pltrusted);
-static int pltcl_elog(ClientData cdata, Tcl_Interp *interp,
- int objc, Tcl_Obj *const objv[]);
+static int pltcl_elog(ClientData cdata, Tcl_Interp *interp,
+ int objc, Tcl_Obj *const objv[]);
static void pltcl_construct_errorCode(Tcl_Interp *interp, ErrorData *edata);
static const char *pltcl_get_condition_name(int sqlstate);
-static int pltcl_quote(ClientData cdata, Tcl_Interp *interp,
- int objc, Tcl_Obj *const objv[]);
-static int pltcl_argisnull(ClientData cdata, Tcl_Interp *interp,
- int objc, Tcl_Obj *const objv[]);
-static int pltcl_returnnull(ClientData cdata, Tcl_Interp *interp,
- int objc, Tcl_Obj *const objv[]);
-static int pltcl_returnnext(ClientData cdata, Tcl_Interp *interp,
- int objc, Tcl_Obj *const objv[]);
-static int pltcl_SPI_execute(ClientData cdata, Tcl_Interp *interp,
- int objc, Tcl_Obj *const objv[]);
-static int pltcl_process_SPI_result(Tcl_Interp *interp,
- const char *arrayname,
- Tcl_Obj *loop_body,
- int spi_rc,
- SPITupleTable *tuptable,
- uint64 ntuples);
-static int pltcl_SPI_prepare(ClientData cdata, Tcl_Interp *interp,
- int objc, Tcl_Obj *const objv[]);
-static int pltcl_SPI_execute_plan(ClientData cdata, Tcl_Interp *interp,
- int objc, Tcl_Obj *const objv[]);
-static int pltcl_subtransaction(ClientData cdata, Tcl_Interp *interp,
- int objc, Tcl_Obj *const objv[]);
-static int pltcl_commit(ClientData cdata, Tcl_Interp *interp,
- int objc, Tcl_Obj *const objv[]);
-static int pltcl_rollback(ClientData cdata, Tcl_Interp *interp,
- int objc, Tcl_Obj *const objv[]);
+static int pltcl_quote(ClientData cdata, Tcl_Interp *interp,
+ int objc, Tcl_Obj *const objv[]);
+static int pltcl_argisnull(ClientData cdata, Tcl_Interp *interp,
+ int objc, Tcl_Obj *const objv[]);
+static int pltcl_returnnull(ClientData cdata, Tcl_Interp *interp,
+ int objc, Tcl_Obj *const objv[]);
+static int pltcl_returnnext(ClientData cdata, Tcl_Interp *interp,
+ int objc, Tcl_Obj *const objv[]);
+static int pltcl_SPI_execute(ClientData cdata, Tcl_Interp *interp,
+ int objc, Tcl_Obj *const objv[]);
+static int pltcl_process_SPI_result(Tcl_Interp *interp,
+ const char *arrayname,
+ Tcl_Obj *loop_body,
+ int spi_rc,
+ SPITupleTable *tuptable,
+ uint64 ntuples);
+static int pltcl_SPI_prepare(ClientData cdata, Tcl_Interp *interp,
+ int objc, Tcl_Obj *const objv[]);
+static int pltcl_SPI_execute_plan(ClientData cdata, Tcl_Interp *interp,
+ int objc, Tcl_Obj *const objv[]);
+static int pltcl_subtransaction(ClientData cdata, Tcl_Interp *interp,
+ int objc, Tcl_Obj *const objv[]);
+static int pltcl_commit(ClientData cdata, Tcl_Interp *interp,
+ int objc, Tcl_Obj *const objv[]);
+static int pltcl_rollback(ClientData cdata, Tcl_Interp *interp,
+ int objc, Tcl_Obj *const objv[]);
static void pltcl_subtrans_begin(MemoryContext oldcontext,
- ResourceOwner oldowner);
+ ResourceOwner oldowner);
static void pltcl_subtrans_commit(MemoryContext oldcontext,
- ResourceOwner oldowner);
+ ResourceOwner oldowner);
static void pltcl_subtrans_abort(Tcl_Interp *interp,
- MemoryContext oldcontext,
- ResourceOwner oldowner);
+ MemoryContext oldcontext,
+ ResourceOwner oldowner);
static void pltcl_set_tuple_values(Tcl_Interp *interp, const char *arrayname,
- uint64 tupno, HeapTuple tuple, TupleDesc tupdesc);
+ uint64 tupno, HeapTuple tuple, TupleDesc tupdesc);
static Tcl_Obj *pltcl_build_tuple_argument(HeapTuple tuple, TupleDesc tupdesc, bool include_generated);
static HeapTuple pltcl_build_tuple_result(Tcl_Interp *interp,
- Tcl_Obj **kvObjv, int kvObjc,
- pltcl_call_state *call_state);
+ Tcl_Obj **kvObjv, int kvObjc,
+ pltcl_call_state *call_state);
static void pltcl_init_tuple_store(pltcl_call_state *call_state);