summaryrefslogtreecommitdiff
path: root/src/pl
diff options
context:
space:
mode:
authorTom Lane2017-06-21 19:35:54 +0000
committerTom Lane2017-06-21 19:35:54 +0000
commit382ceffdf7f620d8f2d50e451b4167d291ae2348 (patch)
treef558251492f2c6f86e3566f7a82f9d00509122c2 /src/pl
parentc7b8998ebbf310a156aa38022555a24d98fdbfb4 (diff)
Phase 3 of pgindent updates.
Don't move parenthesized lines to the left, even if that means they flow past the right margin. By default, BSD indent lines up statement continuation lines that are within parentheses so that they start just to the right of the preceding left parenthesis. However, traditionally, if that resulted in the continuation line extending to the right of the desired right margin, then indent would push it left just far enough to not overrun the margin, if it could do so without making the continuation line start to the left of the current statement indent. That makes for a weird mix of indentations unless one has been completely rigid about never violating the 80-column limit. This behavior has been pretty universally panned by Postgres developers. Hence, disable it with indent's new -lpl switch, so that parenthesized lines are always lined up with the preceding left paren. This patch is much less interesting than the first round of indent changes, but also bulkier, so I thought it best to separate the effects. Discussion: https://postgr.es/m/E1dAmxK-0006EE-1r@gemulon.postgresql.org Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
Diffstat (limited to 'src/pl')
-rw-r--r--src/pl/plperl/plperl.c44
-rw-r--r--src/pl/plpgsql/src/pl_comp.c42
-rw-r--r--src/pl/plpgsql/src/pl_exec.c146
-rw-r--r--src/pl/plpgsql/src/pl_handler.c4
-rw-r--r--src/pl/plpython/plpy_cursorobject.c6
-rw-r--r--src/pl/plpython/plpy_elog.c14
-rw-r--r--src/pl/plpython/plpy_elog.h2
-rw-r--r--src/pl/plpython/plpy_exec.c10
-rw-r--r--src/pl/plpython/plpy_plpymodule.c4
-rw-r--r--src/pl/plpython/plpy_procedure.c10
-rw-r--r--src/pl/plpython/plpy_spi.c8
-rw-r--r--src/pl/plpython/plpy_typeio.c2
-rw-r--r--src/pl/tcl/pltcl.c74
13 files changed, 183 insertions, 183 deletions
diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c
index 02ce6703469..5a45e3e0aa3 100644
--- a/src/pl/plperl/plperl.c
+++ b/src/pl/plperl/plperl.c
@@ -649,7 +649,7 @@ select_perl_context(bool trusted)
ereport(ERROR,
(errcode(ERRCODE_EXTERNAL_ROUTINE_EXCEPTION),
errmsg("%s", strip_trailing_ws(sv2cstr(ERRSV))),
- errcontext("while executing PostgreSQL::InServer::SPI::bootstrap")));
+ errcontext("while executing PostgreSQL::InServer::SPI::bootstrap")));
/* Fully initialized, so mark the hashtable entry valid */
interp_desc->interp = interp;
@@ -1320,19 +1320,19 @@ plperl_sv_to_datum(SV *sv, Oid typid, int32 typmod,
if (!type_is_rowtype(typid))
ereport(ERROR,
(errcode(ERRCODE_DATATYPE_MISMATCH),
- errmsg("cannot convert Perl hash to non-composite type %s",
- format_type_be(typid))));
+ errmsg("cannot convert Perl hash to non-composite type %s",
+ format_type_be(typid))));
td = lookup_rowtype_tupdesc_noerror(typid, typmod, true);
if (td == NULL)
{
/* Try to look it up based on our result type */
if (fcinfo == NULL ||
- get_call_result_type(fcinfo, NULL, &td) != TYPEFUNC_COMPOSITE)
+ get_call_result_type(fcinfo, NULL, &td) != TYPEFUNC_COMPOSITE)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("function returning record called in context "
- "that cannot accept type record")));
+ errmsg("function returning record called in context "
+ "that cannot accept type record")));
}
ret = plperl_hash_to_datum(sv, td);
@@ -1346,7 +1346,7 @@ plperl_sv_to_datum(SV *sv, Oid typid, int32 typmod,
/* Reference, but not reference to hash or array ... */
ereport(ERROR,
(errcode(ERRCODE_DATATYPE_MISMATCH),
- errmsg("PL/Perl function must return reference to hash or array")));
+ errmsg("PL/Perl function must return reference to hash or array")));
return (Datum) 0; /* shut up compiler */
}
else
@@ -1436,8 +1436,8 @@ plperl_ref_from_pg_array(Datum arg, Oid typid)
/* Check for a transform function */
transform_funcid = get_transform_fromsql(elementtype,
- current_call_data->prodesc->lang_oid,
- current_call_data->prodesc->trftypes);
+ current_call_data->prodesc->lang_oid,
+ current_call_data->prodesc->trftypes);
/* Look up transform or output function as appropriate */
if (OidIsValid(transform_funcid))
@@ -1572,7 +1572,7 @@ plperl_trigger_build_args(FunctionCallInfo fcinfo)
relid = DatumGetCString(
DirectFunctionCall1(oidout,
- ObjectIdGetDatum(tdata->tg_relation->rd_id)
+ ObjectIdGetDatum(tdata->tg_relation->rd_id)
)
);
@@ -1725,8 +1725,8 @@ plperl_modify_tuple(HV *hvTD, TriggerData *tdata, HeapTuple otup)
key)));
modvalues[attn - 1] = plperl_sv_to_datum(val,
- tupdesc->attrs[attn - 1]->atttypid,
- tupdesc->attrs[attn - 1]->atttypmod,
+ tupdesc->attrs[attn - 1]->atttypid,
+ tupdesc->attrs[attn - 1]->atttypmod,
NULL,
NULL,
InvalidOid,
@@ -2076,8 +2076,8 @@ plperl_create_sub(plperl_proc_desc *prodesc, char *s, Oid fn_oid)
if (!subref)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
- errmsg("didn't get a CODE reference from compiling function \"%s\"",
- prodesc->proname)));
+ errmsg("didn't get a CODE reference from compiling function \"%s\"",
+ prodesc->proname)));
prodesc->reference = subref;
@@ -2527,8 +2527,8 @@ plperl_trigger_handler(PG_FUNCTION_ARGS)
{
ereport(ERROR,
(errcode(ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED),
- errmsg("result of PL/Perl trigger function must be undef, "
- "\"SKIP\", or \"MODIFY\"")));
+ errmsg("result of PL/Perl trigger function must be undef, "
+ "\"SKIP\", or \"MODIFY\"")));
trv = NULL;
}
retval = PointerGetDatum(trv);
@@ -2735,7 +2735,7 @@ compile_plperl_function(Oid fn_oid, bool is_trigger, bool is_event_trigger)
/* Fetch protrftypes */
protrftypes_datum = SysCacheGetAttr(PROCOID, procTup,
- Anum_pg_proc_protrftypes, &isnull);
+ Anum_pg_proc_protrftypes, &isnull);
MemoryContextSwitchTo(proc_cxt);
prodesc->trftypes = isnull ? NIL : oid_array_to_list(protrftypes_datum);
MemoryContextSwitchTo(oldcontext);
@@ -2789,7 +2789,7 @@ compile_plperl_function(Oid fn_oid, bool is_trigger, bool is_event_trigger)
prodesc->result_oid = procStruct->prorettype;
prodesc->fn_retisset = procStruct->proretset;
prodesc->fn_retistuple = (procStruct->prorettype == RECORDOID ||
- typeStruct->typtype == TYPTYPE_COMPOSITE);
+ typeStruct->typtype == TYPTYPE_COMPOSITE);
prodesc->fn_retisarray =
(typeStruct->typlen == -1 && typeStruct->typelem);
@@ -2813,7 +2813,7 @@ compile_plperl_function(Oid fn_oid, bool is_trigger, bool is_event_trigger)
for (i = 0; i < prodesc->nargs; i++)
{
typeTup = SearchSysCache1(TYPEOID,
- ObjectIdGetDatum(procStruct->proargtypes.values[i]));
+ ObjectIdGetDatum(procStruct->proargtypes.values[i]));
if (!HeapTupleIsValid(typeTup))
elog(ERROR, "cache lookup failed for type %u",
procStruct->proargtypes.values[i]);
@@ -2825,7 +2825,7 @@ compile_plperl_function(Oid fn_oid, bool is_trigger, bool is_event_trigger)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("PL/Perl functions cannot accept type %s",
- format_type_be(procStruct->proargtypes.values[i]))));
+ format_type_be(procStruct->proargtypes.values[i]))));
if (typeStruct->typtype == TYPTYPE_COMPOSITE ||
procStruct->proargtypes.values[i] == RECORDOID)
@@ -3117,7 +3117,7 @@ plperl_spi_execute_fetch_result(SPITupleTable *tuptable, uint64 processed,
if (processed > (uint64) AV_SIZE_MAX)
ereport(ERROR,
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
- errmsg("query result has too many rows to fit in a Perl array")));
+ errmsg("query result has too many rows to fit in a Perl array")));
rows = newAV();
av_extend(rows, processed);
@@ -3635,7 +3635,7 @@ plperl_spi_exec_prepared(char *query, HV *attr, int argc, SV **argv)
* go
************************************************************/
spi_rv = SPI_execute_plan(qdesc->plan, argvalues, nulls,
- current_call_data->prodesc->fn_readonly, limit);
+ current_call_data->prodesc->fn_readonly, limit);
ret_hv = plperl_spi_execute_fetch_result(SPI_tuptable, SPI_processed,
spi_rv);
if (argc > 0)
diff --git a/src/pl/plpgsql/src/pl_comp.c b/src/pl/plpgsql/src/pl_comp.c
index 41cac84867b..662b3c97d7f 100644
--- a/src/pl/plpgsql/src/pl_comp.c
+++ b/src/pl/plpgsql/src/pl_comp.c
@@ -421,7 +421,7 @@ do_compile(FunctionCallInfo fcinfo,
/* Create datatype info */
argdtype = plpgsql_build_datatype(argtypeid,
-1,
- function->fn_input_collation);
+ function->fn_input_collation);
/* Disallow pseudotype argument */
/* (note we already replaced polymorphic types) */
@@ -430,8 +430,8 @@ do_compile(FunctionCallInfo fcinfo,
argdtype->ttype != PLPGSQL_TTYPE_ROW)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("PL/pgSQL functions cannot accept type %s",
- format_type_be(argtypeid))));
+ errmsg("PL/pgSQL functions cannot accept type %s",
+ format_type_be(argtypeid))));
/* Build variable and add to datum list */
argvariable = plpgsql_build_variable(buf, 0,
@@ -511,9 +511,9 @@ do_compile(FunctionCallInfo fcinfo,
if (!OidIsValid(rettypeid))
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("could not determine actual return type "
- "for polymorphic function \"%s\"",
- plpgsql_error_funcname)));
+ errmsg("could not determine actual return type "
+ "for polymorphic function \"%s\"",
+ plpgsql_error_funcname)));
}
}
@@ -545,8 +545,8 @@ do_compile(FunctionCallInfo fcinfo,
else
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("PL/pgSQL functions cannot return type %s",
- format_type_be(rettypeid))));
+ errmsg("PL/pgSQL functions cannot return type %s",
+ format_type_be(rettypeid))));
}
if (typeStruct->typrelid != InvalidOid ||
@@ -568,7 +568,7 @@ do_compile(FunctionCallInfo fcinfo,
(void) plpgsql_build_variable("$0", 0,
build_datatype(typeTup,
-1,
- function->fn_input_collation),
+ function->fn_input_collation),
true);
}
}
@@ -586,7 +586,7 @@ do_compile(FunctionCallInfo fcinfo,
if (procStruct->pronargs != 0)
ereport(ERROR,
(errcode(ERRCODE_INVALID_FUNCTION_DEFINITION),
- errmsg("trigger functions cannot have declared arguments"),
+ errmsg("trigger functions cannot have declared arguments"),
errhint("The arguments of the trigger can be accessed through TG_NARGS and TG_ARGV instead.")));
/* Add the record for referencing NEW ROW */
@@ -609,7 +609,7 @@ do_compile(FunctionCallInfo fcinfo,
var = plpgsql_build_variable("tg_when", 0,
plpgsql_build_datatype(TEXTOID,
-1,
- function->fn_input_collation),
+ function->fn_input_collation),
true);
function->tg_when_varno = var->dno;
@@ -617,7 +617,7 @@ do_compile(FunctionCallInfo fcinfo,
var = plpgsql_build_variable("tg_level", 0,
plpgsql_build_datatype(TEXTOID,
-1,
- function->fn_input_collation),
+ function->fn_input_collation),
true);
function->tg_level_varno = var->dno;
@@ -625,7 +625,7 @@ do_compile(FunctionCallInfo fcinfo,
var = plpgsql_build_variable("tg_op", 0,
plpgsql_build_datatype(TEXTOID,
-1,
- function->fn_input_collation),
+ function->fn_input_collation),
true);
function->tg_op_varno = var->dno;
@@ -673,7 +673,7 @@ do_compile(FunctionCallInfo fcinfo,
var = plpgsql_build_variable("tg_argv", 0,
plpgsql_build_datatype(TEXTARRAYOID,
-1,
- function->fn_input_collation),
+ function->fn_input_collation),
true);
function->tg_argv_varno = var->dno;
@@ -695,7 +695,7 @@ do_compile(FunctionCallInfo fcinfo,
var = plpgsql_build_variable("tg_event", 0,
plpgsql_build_datatype(TEXTOID,
-1,
- function->fn_input_collation),
+ function->fn_input_collation),
true);
function->tg_event_varno = var->dno;
@@ -703,7 +703,7 @@ do_compile(FunctionCallInfo fcinfo,
var = plpgsql_build_variable("tg_tag", 0,
plpgsql_build_datatype(TEXTOID,
-1,
- function->fn_input_collation),
+ function->fn_input_collation),
true);
function->tg_tag_varno = var->dno;
@@ -2034,9 +2034,9 @@ build_row_from_class(Oid classOid)
* we ignore this information for now.
*/
var = plpgsql_build_variable(refname, 0,
- plpgsql_build_datatype(attrStruct->atttypid,
- attrStruct->atttypmod,
- attrStruct->attcollation),
+ plpgsql_build_datatype(attrStruct->atttypid,
+ attrStruct->atttypmod,
+ attrStruct->attcollation),
false);
/* Add the variable to the row */
@@ -2206,7 +2206,7 @@ build_datatype(HeapTuple typeTup, int32 typmod, Oid collation)
/* we can short-circuit looking up base types if it's not varlena */
typ->typisarray = (typeStruct->typlen == -1 &&
typeStruct->typstorage != 'p' &&
- OidIsValid(get_base_element_type(typeStruct->typbasetype)));
+ OidIsValid(get_base_element_type(typeStruct->typbasetype)));
}
else
typ->typisarray = false;
@@ -2316,7 +2316,7 @@ plpgsql_start_datums(void)
plpgsql_nDatums = 0;
/* This is short-lived, so needn't allocate in function's cxt */
plpgsql_Datums = MemoryContextAlloc(plpgsql_compile_tmp_cxt,
- sizeof(PLpgSQL_datum *) * datums_alloc);
+ sizeof(PLpgSQL_datum *) * datums_alloc);
/* datums_last tracks what's been seen by plpgsql_add_initdatums() */
datums_last = 0;
}
diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c
index 20ad7eea0de..c98492b2a42 100644
--- a/src/pl/plpgsql/src/pl_exec.c
+++ b/src/pl/plpgsql/src/pl_exec.c
@@ -396,8 +396,8 @@ plpgsql_exec_function(PLpgSQL_function *func, FunctionCallInfo fcinfo,
{
/* take ownership of R/W object */
assign_simple_var(&estate, var,
- TransferExpandedObject(var->value,
- CurrentMemoryContext),
+ TransferExpandedObject(var->value,
+ CurrentMemoryContext),
false,
true);
}
@@ -410,7 +410,7 @@ plpgsql_exec_function(PLpgSQL_function *func, FunctionCallInfo fcinfo,
/* flat array, so force to expanded form */
assign_simple_var(&estate, var,
expand_array(var->value,
- CurrentMemoryContext,
+ CurrentMemoryContext,
NULL),
false,
true);
@@ -712,7 +712,7 @@ plpgsql_exec_trigger(PLpgSQL_function *func,
var = (PLpgSQL_var *) (estate.datums[func->tg_name_varno]);
assign_simple_var(&estate, var,
DirectFunctionCall1(namein,
- CStringGetDatum(trigdata->tg_trigger->tgname)),
+ CStringGetDatum(trigdata->tg_trigger->tgname)),
false, true);
var = (PLpgSQL_var *) (estate.datums[func->tg_when_varno]);
@@ -741,21 +741,21 @@ plpgsql_exec_trigger(PLpgSQL_function *func,
var = (PLpgSQL_var *) (estate.datums[func->tg_relname_varno]);
assign_simple_var(&estate, var,
DirectFunctionCall1(namein,
- CStringGetDatum(RelationGetRelationName(trigdata->tg_relation))),
+ CStringGetDatum(RelationGetRelationName(trigdata->tg_relation))),
false, true);
var = (PLpgSQL_var *) (estate.datums[func->tg_table_name_varno]);
assign_simple_var(&estate, var,
DirectFunctionCall1(namein,
- CStringGetDatum(RelationGetRelationName(trigdata->tg_relation))),
+ CStringGetDatum(RelationGetRelationName(trigdata->tg_relation))),
false, true);
var = (PLpgSQL_var *) (estate.datums[func->tg_table_schema_varno]);
assign_simple_var(&estate, var,
DirectFunctionCall1(namein,
CStringGetDatum(get_namespace_name(
- RelationGetNamespace(
- trigdata->tg_relation)))),
+ RelationGetNamespace(
+ trigdata->tg_relation)))),
false, true);
var = (PLpgSQL_var *) (estate.datums[func->tg_nargs_varno]);
@@ -818,7 +818,7 @@ plpgsql_exec_trigger(PLpgSQL_function *func,
estate.err_text = NULL;
ereport(ERROR,
(errcode(ERRCODE_S_R_E_FUNCTION_EXECUTED_NO_RETURN_STATEMENT),
- errmsg("control reached end of trigger procedure without RETURN")));
+ errmsg("control reached end of trigger procedure without RETURN")));
}
estate.err_stmt = NULL;
@@ -942,7 +942,7 @@ plpgsql_exec_event_trigger(PLpgSQL_function *func, EventTriggerData *trigdata)
estate.err_text = NULL;
ereport(ERROR,
(errcode(ERRCODE_S_R_E_FUNCTION_EXECUTED_NO_RETURN_STATEMENT),
- errmsg("control reached end of trigger procedure without RETURN")));
+ errmsg("control reached end of trigger procedure without RETURN")));
}
estate.err_stmt = NULL;
@@ -1713,8 +1713,8 @@ exec_stmt_getdiag(PLpgSQL_execstate *estate, PLpgSQL_stmt_getdiag *stmt)
*/
if (stmt->is_stacked && estate->cur_error == NULL)
ereport(ERROR,
- (errcode(ERRCODE_STACKED_DIAGNOSTICS_ACCESSED_WITHOUT_ACTIVE_HANDLER),
- errmsg("GET STACKED DIAGNOSTICS cannot be used outside an exception handler")));
+ (errcode(ERRCODE_STACKED_DIAGNOSTICS_ACCESSED_WITHOUT_ACTIVE_HANDLER),
+ errmsg("GET STACKED DIAGNOSTICS cannot be used outside an exception handler")));
foreach(lc, stmt->diag_items)
{
@@ -1752,7 +1752,7 @@ exec_stmt_getdiag(PLpgSQL_execstate *estate, PLpgSQL_stmt_getdiag *stmt)
case PLPGSQL_GETDIAG_RETURNED_SQLSTATE:
exec_assign_c_string(estate, var,
- unpack_sql_state(estate->cur_error->sqlerrcode));
+ unpack_sql_state(estate->cur_error->sqlerrcode));
break;
case PLPGSQL_GETDIAG_COLUMN_NAME:
@@ -1877,7 +1877,7 @@ exec_stmt_case(PLpgSQL_execstate *estate, PLpgSQL_stmt_case *stmt)
t_var->datatype->atttypmod != t_typmod)
t_var->datatype = plpgsql_build_datatype(t_typoid,
t_typmod,
- estate->func->fn_input_collation);
+ estate->func->fn_input_collation);
/* now we can assign to the variable */
exec_assign_value(estate,
@@ -2114,7 +2114,7 @@ exec_stmt_fori(PLpgSQL_execstate *estate, PLpgSQL_stmt_fori *stmt)
if (step_value <= 0)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("BY value of FOR loop must be greater than zero")));
+ errmsg("BY value of FOR loop must be greater than zero")));
}
else
step_value = 1;
@@ -2452,8 +2452,8 @@ exec_stmt_foreach_a(PLpgSQL_execstate *estate, PLpgSQL_stmt_foreach_a *stmt)
if (stmt->slice < 0 || stmt->slice > ARR_NDIM(arr))
ereport(ERROR,
(errcode(ERRCODE_ARRAY_SUBSCRIPT_ERROR),
- errmsg("slice dimension (%d) is out of the valid range 0..%d",
- stmt->slice, ARR_NDIM(arr))));
+ errmsg("slice dimension (%d) is out of the valid range 0..%d",
+ stmt->slice, ARR_NDIM(arr))));
/* Set up the loop variable and see if it is of an array type */
loop_var = estate->datums[stmt->varno];
@@ -2468,7 +2468,7 @@ exec_stmt_foreach_a(PLpgSQL_execstate *estate, PLpgSQL_stmt_foreach_a *stmt)
}
else
loop_var_elem_type = get_element_type(plpgsql_exec_get_datum_type(estate,
- loop_var));
+ loop_var));
/*
* Sanity-check the loop variable type. We don't try very hard here, and
@@ -2479,11 +2479,11 @@ exec_stmt_foreach_a(PLpgSQL_execstate *estate, PLpgSQL_stmt_foreach_a *stmt)
if (stmt->slice > 0 && loop_var_elem_type == InvalidOid)
ereport(ERROR,
(errcode(ERRCODE_DATATYPE_MISMATCH),
- errmsg("FOREACH ... SLICE loop variable must be of an array type")));
+ errmsg("FOREACH ... SLICE loop variable must be of an array type")));
if (stmt->slice == 0 && loop_var_elem_type != InvalidOid)
ereport(ERROR,
(errcode(ERRCODE_DATATYPE_MISMATCH),
- errmsg("FOREACH loop variable must not be of an array type")));
+ errmsg("FOREACH loop variable must not be of an array type")));
/* Create an iterator to step through the array */
array_iterator = array_create_iterator(arr, stmt->slice, NULL);
@@ -2846,12 +2846,12 @@ exec_stmt_return_next(PLpgSQL_execstate *estate,
if (natts != 1)
ereport(ERROR,
(errcode(ERRCODE_DATATYPE_MISMATCH),
- errmsg("wrong result type supplied in RETURN NEXT")));
+ errmsg("wrong result type supplied in RETURN NEXT")));
/* let's be very paranoid about the cast step */
retval = MakeExpandedObjectReadOnly(retval,
isNull,
- var->datatype->typlen);
+ var->datatype->typlen);
/* coerce type if needed */
retval = exec_cast_value(estate,
@@ -2874,11 +2874,11 @@ exec_stmt_return_next(PLpgSQL_execstate *estate,
if (!HeapTupleIsValid(rec->tup))
ereport(ERROR,
- (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
- errmsg("record \"%s\" is not assigned yet",
- rec->refname),
- errdetail("The tuple structure of a not-yet-assigned"
- " record is indeterminate.")));
+ (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
+ errmsg("record \"%s\" is not assigned yet",
+ rec->refname),
+ errdetail("The tuple structure of a not-yet-assigned"
+ " record is indeterminate.")));
/* Use eval_mcontext for tuple conversion work */
oldcontext = MemoryContextSwitchTo(get_eval_mcontext(estate));
@@ -2903,7 +2903,7 @@ exec_stmt_return_next(PLpgSQL_execstate *estate,
if (tuple == NULL)
ereport(ERROR,
(errcode(ERRCODE_DATATYPE_MISMATCH),
- errmsg("wrong record type supplied in RETURN NEXT")));
+ errmsg("wrong record type supplied in RETURN NEXT")));
tuplestore_puttuple(estate->tuple_store, tuple);
MemoryContextSwitchTo(oldcontext);
}
@@ -2973,7 +2973,7 @@ exec_stmt_return_next(PLpgSQL_execstate *estate,
if (natts != 1)
ereport(ERROR,
(errcode(ERRCODE_DATATYPE_MISMATCH),
- errmsg("wrong result type supplied in RETURN NEXT")));
+ errmsg("wrong result type supplied in RETURN NEXT")));
/* coerce type if needed */
retval = exec_cast_value(estate,
@@ -3042,7 +3042,7 @@ exec_stmt_return_query(PLpgSQL_execstate *estate,
tupmap = convert_tuples_by_position(portal->tupDesc,
estate->rettupdesc,
- gettext_noop("structure of query does not match function result type"));
+ gettext_noop("structure of query does not match function result type"));
while (true)
{
@@ -3159,8 +3159,8 @@ exec_stmt_raise(PLpgSQL_execstate *estate, PLpgSQL_stmt_raise *stmt)
ReThrowError(estate->cur_error);
/* oops, we're not inside a handler */
ereport(ERROR,
- (errcode(ERRCODE_STACKED_DIAGNOSTICS_ACCESSED_WITHOUT_ACTIVE_HANDLER),
- errmsg("RAISE without parameters cannot be used outside an exception handler")));
+ (errcode(ERRCODE_STACKED_DIAGNOSTICS_ACCESSED_WITHOUT_ACTIVE_HANDLER),
+ errmsg("RAISE without parameters cannot be used outside an exception handler")));
}
/* We'll need to accumulate the various strings in stmt_mcontext */
@@ -3212,7 +3212,7 @@ exec_stmt_raise(PLpgSQL_execstate *estate, PLpgSQL_stmt_raise *stmt)
elog(ERROR, "unexpected RAISE parameter list length");
paramvalue = exec_eval_expr(estate,
- (PLpgSQL_expr *) lfirst(current_param),
+ (PLpgSQL_expr *) lfirst(current_param),
&paramisnull,
&paramtypeid,
&paramtypmod);
@@ -3458,7 +3458,7 @@ plpgsql_estate_setup(PLpgSQL_execstate *estate,
estate->cast_hash = hash_create("PLpgSQL private cast cache",
16, /* start small and extend */
&ctl,
- HASH_ELEM | HASH_BLOBS | HASH_CONTEXT);
+ HASH_ELEM | HASH_BLOBS | HASH_CONTEXT);
estate->cast_hash_context = CurrentMemoryContext;
}
else
@@ -3469,7 +3469,7 @@ plpgsql_estate_setup(PLpgSQL_execstate *estate,
{
shared_cast_context = AllocSetContextCreate(TopMemoryContext,
"PLpgSQL cast info",
- ALLOCSET_DEFAULT_SIZES);
+ ALLOCSET_DEFAULT_SIZES);
memset(&ctl, 0, sizeof(ctl));
ctl.keysize = sizeof(plpgsql_CastHashKey);
ctl.entrysize = sizeof(plpgsql_CastHashEntry);
@@ -3477,7 +3477,7 @@ plpgsql_estate_setup(PLpgSQL_execstate *estate,
shared_cast_hash = hash_create("PLpgSQL cast cache",
16, /* start small and extend */
&ctl,
- HASH_ELEM | HASH_BLOBS | HASH_CONTEXT);
+ HASH_ELEM | HASH_BLOBS | HASH_CONTEXT);
}
estate->cast_hash = shared_cast_hash;
estate->cast_hash_context = shared_cast_context;
@@ -3731,7 +3731,7 @@ exec_stmt_execsql(PLpgSQL_execstate *estate,
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("cannot begin/end transactions in PL/pgSQL"),
- errhint("Use a BEGIN block with an EXCEPTION clause instead.")));
+ errhint("Use a BEGIN block with an EXCEPTION clause instead.")));
default:
elog(ERROR, "SPI_execute_plan_with_paramlist failed executing query \"%s\": %s",
@@ -3754,7 +3754,7 @@ exec_stmt_execsql(PLpgSQL_execstate *estate,
if (tuptab == NULL)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
- errmsg("INTO used with a command that cannot return data")));
+ errmsg("INTO used with a command that cannot return data")));
/* Determine if we assign to a record or a row */
if (stmt->rec != NULL)
@@ -3921,7 +3921,7 @@ exec_stmt_dynexecute(PLpgSQL_execstate *estate,
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("cannot begin/end transactions in PL/pgSQL"),
- errhint("Use a BEGIN block with an EXCEPTION clause instead.")));
+ errhint("Use a BEGIN block with an EXCEPTION clause instead.")));
default:
elog(ERROR, "SPI_execute failed executing query \"%s\": %s",
@@ -3945,7 +3945,7 @@ exec_stmt_dynexecute(PLpgSQL_execstate *estate,
if (tuptab == NULL)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
- errmsg("INTO used with a command that cannot return data")));
+ errmsg("INTO used with a command that cannot return data")));
/* Determine if we assign to a record or a row */
if (stmt->rec != NULL)
@@ -4147,7 +4147,7 @@ exec_stmt_open(PLpgSQL_execstate *estate, PLpgSQL_stmt_open *stmt)
if (curvar->cursor_explicit_argrow < 0)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
- errmsg("arguments given for cursor without arguments")));
+ errmsg("arguments given for cursor without arguments")));
memset(&set_args, 0, sizeof(set_args));
set_args.cmd_type = PLPGSQL_STMT_EXECSQL;
@@ -4568,10 +4568,10 @@ exec_assign_value(PLpgSQL_execstate *estate,
*/
if (!HeapTupleIsValid(rec->tup))
ereport(ERROR,
- (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
- errmsg("record \"%s\" is not assigned yet",
- rec->refname),
- errdetail("The tuple structure of a not-yet-assigned record is indeterminate.")));
+ (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
+ errmsg("record \"%s\" is not assigned yet",
+ rec->refname),
+ errdetail("The tuple structure of a not-yet-assigned record is indeterminate.")));
/*
* Get the number of the record field to change. Disallow
@@ -4690,7 +4690,7 @@ exec_assign_value(PLpgSQL_execstate *estate,
if (!OidIsValid(elemtypoid))
ereport(ERROR,
(errcode(ERRCODE_DATATYPE_MISMATCH),
- errmsg("subscripted object is not an array")));
+ errmsg("subscripted object is not an array")));
/* Collect needed data about the types */
arraytyplen = get_typlen(arraytypoid);
@@ -4876,10 +4876,10 @@ exec_eval_datum(PLpgSQL_execstate *estate,
if (!HeapTupleIsValid(rec->tup))
ereport(ERROR,
- (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
- errmsg("record \"%s\" is not assigned yet",
- rec->refname),
- errdetail("The tuple structure of a not-yet-assigned record is indeterminate.")));
+ (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
+ errmsg("record \"%s\" is not assigned yet",
+ rec->refname),
+ errdetail("The tuple structure of a not-yet-assigned record is indeterminate.")));
Assert(rec->tupdesc != NULL);
/* Make sure we have a valid type/typmod setting */
BlessTupleDesc(rec->tupdesc);
@@ -4902,10 +4902,10 @@ exec_eval_datum(PLpgSQL_execstate *estate,
rec = (PLpgSQL_rec *) (estate->datums[recfield->recparentno]);
if (!HeapTupleIsValid(rec->tup))
ereport(ERROR,
- (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
- errmsg("record \"%s\" is not assigned yet",
- rec->refname),
- errdetail("The tuple structure of a not-yet-assigned record is indeterminate.")));
+ (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
+ errmsg("record \"%s\" is not assigned yet",
+ rec->refname),
+ errdetail("The tuple structure of a not-yet-assigned record is indeterminate.")));
fno = SPI_fnumber(rec->tupdesc, recfield->fieldname);
if (fno == SPI_ERROR_NOATTRIBUTE)
ereport(ERROR,
@@ -4968,10 +4968,10 @@ plpgsql_exec_get_datum_type(PLpgSQL_execstate *estate,
if (rec->tupdesc == NULL)
ereport(ERROR,
- (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
- errmsg("record \"%s\" is not assigned yet",
- rec->refname),
- errdetail("The tuple structure of a not-yet-assigned record is indeterminate.")));
+ (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
+ errmsg("record \"%s\" is not assigned yet",
+ rec->refname),
+ errdetail("The tuple structure of a not-yet-assigned record is indeterminate.")));
/* Make sure we have a valid type/typmod setting */
BlessTupleDesc(rec->tupdesc);
typeid = rec->tupdesc->tdtypeid;
@@ -4987,10 +4987,10 @@ plpgsql_exec_get_datum_type(PLpgSQL_execstate *estate,
rec = (PLpgSQL_rec *) (estate->datums[recfield->recparentno]);
if (rec->tupdesc == NULL)
ereport(ERROR,
- (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
- errmsg("record \"%s\" is not assigned yet",
- rec->refname),
- errdetail("The tuple structure of a not-yet-assigned record is indeterminate.")));
+ (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
+ errmsg("record \"%s\" is not assigned yet",
+ rec->refname),
+ errdetail("The tuple structure of a not-yet-assigned record is indeterminate.")));
fno = SPI_fnumber(rec->tupdesc, recfield->fieldname);
if (fno == SPI_ERROR_NOATTRIBUTE)
ereport(ERROR,
@@ -5055,10 +5055,10 @@ plpgsql_exec_get_datum_type_info(PLpgSQL_execstate *estate,
if (rec->tupdesc == NULL)
ereport(ERROR,
- (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
- errmsg("record \"%s\" is not assigned yet",
- rec->refname),
- errdetail("The tuple structure of a not-yet-assigned record is indeterminate.")));
+ (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
+ errmsg("record \"%s\" is not assigned yet",
+ rec->refname),
+ errdetail("The tuple structure of a not-yet-assigned record is indeterminate.")));
/* Make sure we have a valid type/typmod setting */
BlessTupleDesc(rec->tupdesc);
*typeid = rec->tupdesc->tdtypeid;
@@ -5078,10 +5078,10 @@ plpgsql_exec_get_datum_type_info(PLpgSQL_execstate *estate,
rec = (PLpgSQL_rec *) (estate->datums[recfield->recparentno]);
if (rec->tupdesc == NULL)
ereport(ERROR,
- (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
- errmsg("record \"%s\" is not assigned yet",
- rec->refname),
- errdetail("The tuple structure of a not-yet-assigned record is indeterminate.")));
+ (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
+ errmsg("record \"%s\" is not assigned yet",
+ rec->refname),
+ errdetail("The tuple structure of a not-yet-assigned record is indeterminate.")));
fno = SPI_fnumber(rec->tupdesc, recfield->fieldname);
if (fno == SPI_ERROR_NOATTRIBUTE)
ereport(ERROR,
@@ -5826,7 +5826,7 @@ setup_unshared_param_list(PLpgSQL_execstate *estate, PLpgSQL_expr *expr)
else
prm->value = MakeExpandedObjectReadOnly(var->value,
var->isnull,
- var->datatype->typlen);
+ var->datatype->typlen);
prm->isnull = var->isnull;
prm->pflags = PARAM_FLAG_CONST;
prm->ptype = var->datatype->typoid;
@@ -5921,7 +5921,7 @@ plpgsql_param_fetch(ParamListInfo params, int paramid)
if (datum->dtype == PLPGSQL_DTYPE_VAR && dno != expr->rwparam)
prm->value = MakeExpandedObjectReadOnly(prm->value,
prm->isnull,
- ((PLpgSQL_var *) datum)->datatype->typlen);
+ ((PLpgSQL_var *) datum)->datatype->typlen);
}
@@ -6413,7 +6413,7 @@ get_cast_hashentry(PLpgSQL_execstate *estate,
/* Now we can fill in a hashtable entry. */
cast_entry = (plpgsql_CastHashEntry *) hash_search(estate->cast_hash,
(void *) &cast_key,
- HASH_ENTER, &found);
+ HASH_ENTER, &found);
Assert(!found); /* wasn't there a moment ago */
cast_entry->cast_expr = (Expr *) cast_expr;
cast_entry->cast_exprstate = NULL;
diff --git a/src/pl/plpgsql/src/pl_handler.c b/src/pl/plpgsql/src/pl_handler.c
index 83ec4530dba..1ebb7a7b5ee 100644
--- a/src/pl/plpgsql/src/pl_handler.c
+++ b/src/pl/plpgsql/src/pl_handler.c
@@ -168,7 +168,7 @@ _PG_init(void)
NULL, NULL, NULL);
DefineCustomBoolVariable("plpgsql.check_asserts",
- gettext_noop("Perform checks given in ASSERT statements."),
+ gettext_noop("Perform checks given in ASSERT statements."),
NULL,
&plpgsql_check_asserts,
true,
@@ -247,7 +247,7 @@ plpgsql_call_handler(PG_FUNCTION_ARGS)
*/
if (CALLED_AS_TRIGGER(fcinfo))
retval = PointerGetDatum(plpgsql_exec_trigger(func,
- (TriggerData *) fcinfo->context));
+ (TriggerData *) fcinfo->context));
else if (CALLED_AS_EVENT_TRIGGER(fcinfo))
{
plpgsql_exec_event_trigger(func,
diff --git a/src/pl/plpython/plpy_cursorobject.c b/src/pl/plpython/plpy_cursorobject.c
index 18e689f1415..2ad663cf661 100644
--- a/src/pl/plpython/plpy_cursorobject.c
+++ b/src/pl/plpython/plpy_cursorobject.c
@@ -192,8 +192,8 @@ PLy_cursor_plan(PyObject *ob, PyObject *args)
PLy_elog(ERROR, "could not execute plan");
sv = PyString_AsString(so);
PLy_exception_set_plural(PyExc_TypeError,
- "Expected sequence of %d argument, got %d: %s",
- "Expected sequence of %d arguments, got %d: %s",
+ "Expected sequence of %d argument, got %d: %s",
+ "Expected sequence of %d arguments, got %d: %s",
plan->nargs,
plan->nargs, nargs, sv);
Py_DECREF(so);
@@ -501,7 +501,7 @@ PLy_cursor_close(PyObject *self, PyObject *unused)
if (!PortalIsValid(portal))
{
PLy_exception_set(PyExc_ValueError,
- "closing a cursor in an aborted subtransaction");
+ "closing a cursor in an aborted subtransaction");
return NULL;
}
diff --git a/src/pl/plpython/plpy_elog.c b/src/pl/plpython/plpy_elog.c
index c4806274bc9..bb864899f61 100644
--- a/src/pl/plpython/plpy_elog.c
+++ b/src/pl/plpython/plpy_elog.c
@@ -25,10 +25,10 @@ static void PLy_traceback(PyObject *e, PyObject *v, PyObject *tb,
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 **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 **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);
@@ -122,7 +122,7 @@ PLy_elog(int elevel, const char *fmt,...)
{
ereport(elevel,
(errcode(sqlerrcode ? sqlerrcode : ERRCODE_EXTERNAL_ROUTINE_EXCEPTION),
- errmsg_internal("%s", primary ? primary : "no exception data"),
+ errmsg_internal("%s", primary ? primary : "no exception data"),
(detail) ? errdetail_internal("%s", detail) : 0,
(tb_depth > 0 && tbmsg) ? errcontext("%s", tbmsg) : 0,
(hint) ? errhint("%s", hint) : 0,
@@ -136,8 +136,8 @@ PLy_elog(int elevel, const char *fmt,...)
column_name) : 0,
(datatype_name) ? err_generic_string(PG_DIAG_DATATYPE_NAME,
datatype_name) : 0,
- (constraint_name) ? err_generic_string(PG_DIAG_CONSTRAINT_NAME,
- constraint_name) : 0));
+ (constraint_name) ? err_generic_string(PG_DIAG_CONSTRAINT_NAME,
+ constraint_name) : 0));
}
PG_CATCH();
{
@@ -317,11 +317,11 @@ PLy_traceback(PyObject *e, PyObject *v, PyObject *tb,
if (proname == NULL)
appendStringInfo(
- &tbstr, "\n PL/Python anonymous code block, line %ld, in %s",
+ &tbstr, "\n PL/Python anonymous code block, line %ld, in %s",
plain_lineno - 1, fname);
else
appendStringInfo(
- &tbstr, "\n PL/Python function \"%s\", line %ld, in %s",
+ &tbstr, "\n PL/Python function \"%s\", line %ld, in %s",
proname, plain_lineno - 1, fname);
/*
diff --git a/src/pl/plpython/plpy_elog.h b/src/pl/plpython/plpy_elog.h
index 6bc50fd227d..e73177d130c 100644
--- a/src/pl/plpython/plpy_elog.h
+++ b/src/pl/plpython/plpy_elog.h
@@ -15,7 +15,7 @@ extern void PLy_elog(int elevel, const char *fmt,...) pg_attribute_printf(2, 3);
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 e59d076695b..c6938d00aa4 100644
--- a/src/pl/plpython/plpy_exec.c
+++ b/src/pl/plpython/plpy_exec.c
@@ -376,7 +376,7 @@ PLy_exec_trigger(FunctionCallInfo fcinfo, PLyProcedure *proc)
{
ereport(ERROR,
(errcode(ERRCODE_DATA_EXCEPTION),
- errmsg("unexpected return value from trigger procedure"),
+ errmsg("unexpected return value from trigger procedure"),
errdetail("Expected None or a string.")));
srv = NULL; /* keep compiler quiet */
}
@@ -402,7 +402,7 @@ PLy_exec_trigger(FunctionCallInfo fcinfo, PLyProcedure *proc)
*/
ereport(ERROR,
(errcode(ERRCODE_DATA_EXCEPTION),
- errmsg("unexpected return value from trigger procedure"),
+ errmsg("unexpected return value from trigger procedure"),
errdetail("Expected None, \"OK\", \"SKIP\", or \"MODIFY\".")));
}
}
@@ -487,7 +487,7 @@ PLy_function_build_args(FunctionCallInfo fcinfo, PLyProcedure *proc)
PLy_elog(ERROR, "PyList_SetItem() failed, while setting up arguments");
if (proc->argnames && proc->argnames[i] &&
- PyDict_SetItemString(proc->globals, proc->argnames[i], arg) == -1)
+ PyDict_SetItemString(proc->globals, proc->argnames[i], arg) == -1)
PLy_elog(ERROR, "PyDict_SetItemString() failed, while setting up arguments");
arg = NULL;
}
@@ -554,7 +554,7 @@ PLy_function_save_args(PLyProcedure *proc)
if (proc->argnames[i])
{
result->namedargs[i] = PyDict_GetItemString(proc->globals,
- proc->argnames[i]);
+ proc->argnames[i]);
Py_XINCREF(result->namedargs[i]);
}
}
@@ -747,7 +747,7 @@ PLy_trigger_build_args(FunctionCallInfo fcinfo, PLyProcedure *proc, HeapTuple *r
Py_DECREF(pltname);
stroid = DatumGetCString(DirectFunctionCall1(oidout,
- ObjectIdGetDatum(tdata->tg_relation->rd_id)));
+ ObjectIdGetDatum(tdata->tg_relation->rd_id)));
pltrelid = PyString_FromString(stroid);
PyDict_SetItemString(pltdata, "relid", pltrelid);
Py_DECREF(pltrelid);
diff --git a/src/pl/plpython/plpy_plpymodule.c b/src/pl/plpython/plpy_plpymodule.c
index 619c471903e..feaf2032560 100644
--- a/src/pl/plpython/plpy_plpymodule.c
+++ b/src/pl/plpython/plpy_plpymodule.c
@@ -493,7 +493,7 @@ PLy_output(volatile int level, PyObject *self, PyObject *args, PyObject *kw)
else
{
PLy_exception_set(PyExc_TypeError,
- "'%s' is an invalid keyword argument for this function",
+ "'%s' is an invalid keyword argument for this function",
keyword);
return NULL;
}
@@ -549,7 +549,7 @@ PLy_output(volatile int level, PyObject *self, PyObject *args, PyObject *kw)
(column_name != NULL) ?
err_generic_string(PG_DIAG_COLUMN_NAME, column_name) : 0,
(constraint_name != NULL) ?
- err_generic_string(PG_DIAG_CONSTRAINT_NAME, constraint_name) : 0,
+ err_generic_string(PG_DIAG_CONSTRAINT_NAME, constraint_name) : 0,
(datatype_name != NULL) ?
err_generic_string(PG_DIAG_DATATYPE_NAME, datatype_name) : 0,
(table_name != NULL) ?
diff --git a/src/pl/plpython/plpy_procedure.c b/src/pl/plpython/plpy_procedure.c
index e86117c8374..26acc88b270 100644
--- a/src/pl/plpython/plpy_procedure.c
+++ b/src/pl/plpython/plpy_procedure.c
@@ -215,7 +215,7 @@ PLy_procedure_create(HeapTuple procTup, Oid fn_oid, bool is_trigger)
Form_pg_type rvTypeStruct;
rvTypeTup = SearchSysCache1(TYPEOID,
- ObjectIdGetDatum(procStruct->prorettype));
+ ObjectIdGetDatum(procStruct->prorettype));
if (!HeapTupleIsValid(rvTypeTup))
elog(ERROR, "cache lookup failed for type %u",
procStruct->prorettype);
@@ -232,8 +232,8 @@ PLy_procedure_create(HeapTuple procTup, Oid fn_oid, bool is_trigger)
procStruct->prorettype != RECORDOID)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("PL/Python functions cannot return type %s",
- format_type_be(procStruct->prorettype))));
+ errmsg("PL/Python functions cannot return type %s",
+ format_type_be(procStruct->prorettype))));
}
if (rvTypeStruct->typtype == TYPTYPE_COMPOSITE ||
@@ -313,8 +313,8 @@ PLy_procedure_create(HeapTuple procTup, Oid fn_oid, bool is_trigger)
/* Disallow pseudotype argument */
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("PL/Python functions cannot accept type %s",
- format_type_be(types[i]))));
+ errmsg("PL/Python functions cannot accept type %s",
+ format_type_be(types[i]))));
break;
case TYPTYPE_COMPOSITE:
/* we'll set IO funcs at first call */
diff --git a/src/pl/plpython/plpy_spi.c b/src/pl/plpython/plpy_spi.c
index c6856ccbacc..955769c5e32 100644
--- a/src/pl/plpython/plpy_spi.c
+++ b/src/pl/plpython/plpy_spi.c
@@ -56,7 +56,7 @@ PLy_spi_prepare(PyObject *self, PyObject *args)
if (list && (!PySequence_Check(list)))
{
PLy_exception_set(PyExc_TypeError,
- "second argument of plpy.prepare must be a sequence");
+ "second argument of plpy.prepare must be a sequence");
return NULL;
}
@@ -226,8 +226,8 @@ PLy_spi_execute_plan(PyObject *ob, PyObject *list, long limit)
PLy_elog(ERROR, "could not execute plan");
sv = PyString_AsString(so);
PLy_exception_set_plural(PyExc_TypeError,
- "Expected sequence of %d argument, got %d: %s",
- "Expected sequence of %d arguments, got %d: %s",
+ "Expected sequence of %d argument, got %d: %s",
+ "Expected sequence of %d arguments, got %d: %s",
plan->nargs,
plan->nargs, nargs, sv);
Py_DECREF(so);
@@ -570,7 +570,7 @@ PLy_spi_exception_set(PyObject *excclass, ErrorData *edata)
spidata = Py_BuildValue("(izzzizzzzz)", edata->sqlerrcode, edata->detail, edata->hint,
edata->internalquery, edata->internalpos,
- edata->schema_name, edata->table_name, edata->column_name,
+ edata->schema_name, edata->table_name, edata->column_name,
edata->datatype_name, edata->constraint_name);
if (!spidata)
goto failure;
diff --git a/src/pl/plpython/plpy_typeio.c b/src/pl/plpython/plpy_typeio.c
index 0e04753fa14..b2db8940a0a 100644
--- a/src/pl/plpython/plpy_typeio.c
+++ b/src/pl/plpython/plpy_typeio.c
@@ -683,7 +683,7 @@ PLyList_FromArray_recurse(PLyDatumToOb *elm, int *dims, int ndim, int dim,
PyObject *sublist;
sublist = PLyList_FromArray_recurse(elm, dims, ndim, dim + 1,
- dataptr_p, bitmap_p, bitmask_p);
+ dataptr_p, bitmap_p, bitmask_p);
PyList_SET_ITEM(list, i, sublist);
}
}
diff --git a/src/pl/tcl/pltcl.c b/src/pl/tcl/pltcl.c
index ca4b4b551e7..ed494e12108 100644
--- a/src/pl/tcl/pltcl.c
+++ b/src/pl/tcl/pltcl.c
@@ -456,14 +456,14 @@ _PG_init(void)
* Define PL/Tcl's custom GUCs
************************************************************/
DefineCustomStringVariable("pltcl.start_proc",
- gettext_noop("PL/Tcl function to call once when pltcl is first used."),
+ gettext_noop("PL/Tcl function to call once when pltcl is first used."),
NULL,
&pltcl_start_proc,
NULL,
PGC_SUSET, 0,
NULL, NULL, NULL);
DefineCustomStringVariable("pltclu.start_proc",
- gettext_noop("PL/TclU function to call once when pltclu is first used."),
+ gettext_noop("PL/TclU function to call once when pltclu is first used."),
NULL,
&pltclu_start_proc,
NULL,
@@ -742,7 +742,7 @@ pltcl_handler(PG_FUNCTION_ARGS, bool pltrusted)
{
/* invoke the trigger handler */
retval = PointerGetDatum(pltcl_trigger_handler(fcinfo,
- &current_call_state,
+ &current_call_state,
pltrusted));
}
else if (CALLED_AS_EVENT_TRIGGER(fcinfo))
@@ -899,7 +899,7 @@ pltcl_func_handler(PG_FUNCTION_ARGS, pltcl_call_state *call_state,
fcinfo->arg[i]);
UTF_BEGIN;
Tcl_ListObjAppendElement(NULL, tcl_cmd,
- Tcl_NewStringObj(UTF_E2U(tmp), -1));
+ Tcl_NewStringObj(UTF_E2U(tmp), -1));
UTF_END;
pfree(tmp);
}
@@ -1075,16 +1075,16 @@ pltcl_trigger_handler(PG_FUNCTION_ARGS, pltcl_call_state *call_state,
{
/* The procedure name (note this is all ASCII, so no utf_e2u) */
Tcl_ListObjAppendElement(NULL, tcl_cmd,
- Tcl_NewStringObj(prodesc->internal_proname, -1));
+ Tcl_NewStringObj(prodesc->internal_proname, -1));
/* The trigger name for argument TG_name */
Tcl_ListObjAppendElement(NULL, tcl_cmd,
- Tcl_NewStringObj(utf_e2u(trigdata->tg_trigger->tgname), -1));
+ Tcl_NewStringObj(utf_e2u(trigdata->tg_trigger->tgname), -1));
/* The oid of the trigger relation for argument TG_relid */
/* Consider not converting to a string for more performance? */
stroid = DatumGetCString(DirectFunctionCall1(oidout,
- ObjectIdGetDatum(trigdata->tg_relation->rd_id)));
+ ObjectIdGetDatum(trigdata->tg_relation->rd_id)));
Tcl_ListObjAppendElement(NULL, tcl_cmd,
Tcl_NewStringObj(stroid, -1));
pfree(stroid);
@@ -1208,7 +1208,7 @@ pltcl_trigger_handler(PG_FUNCTION_ARGS, pltcl_call_state *call_state,
/* Finally append the arguments from CREATE TRIGGER */
for (i = 0; i < trigdata->tg_trigger->tgnargs; i++)
Tcl_ListObjAppendElement(NULL, tcl_cmd,
- Tcl_NewStringObj(utf_e2u(trigdata->tg_trigger->tgargs[i]), -1));
+ Tcl_NewStringObj(utf_e2u(trigdata->tg_trigger->tgargs[i]), -1));
}
PG_CATCH();
@@ -1521,7 +1521,7 @@ compile_pltcl_function(Oid fn_oid, Oid tgreloid,
prodesc->fn_retisset = procStruct->proretset;
prodesc->fn_retistuple = (procStruct->prorettype == RECORDOID ||
- typeStruct->typtype == TYPTYPE_COMPOSITE);
+ typeStruct->typtype == TYPTYPE_COMPOSITE);
ReleaseSysCache(typeTup);
}
@@ -1536,7 +1536,7 @@ compile_pltcl_function(Oid fn_oid, Oid tgreloid,
for (i = 0; i < prodesc->nargs; i++)
{
typeTup = SearchSysCache1(TYPEOID,
- ObjectIdGetDatum(procStruct->proargtypes.values[i]));
+ ObjectIdGetDatum(procStruct->proargtypes.values[i]));
if (!HeapTupleIsValid(typeTup))
elog(ERROR, "cache lookup failed for type %u",
procStruct->proargtypes.values[i]);
@@ -1547,7 +1547,7 @@ compile_pltcl_function(Oid fn_oid, Oid tgreloid,
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("PL/Tcl functions cannot accept type %s",
- format_type_be(procStruct->proargtypes.values[i]))));
+ format_type_be(procStruct->proargtypes.values[i]))));
if (typeStruct->typtype == TYPTYPE_COMPOSITE)
{
@@ -1811,11 +1811,11 @@ pltcl_construct_errorCode(Tcl_Interp *interp, ErrorData *edata)
Tcl_ListObjAppendElement(interp, obj,
Tcl_NewStringObj("SQLSTATE", -1));
Tcl_ListObjAppendElement(interp, obj,
- Tcl_NewStringObj(unpack_sql_state(edata->sqlerrcode), -1));
+ Tcl_NewStringObj(unpack_sql_state(edata->sqlerrcode), -1));
Tcl_ListObjAppendElement(interp, obj,
Tcl_NewStringObj("condition", -1));
Tcl_ListObjAppendElement(interp, obj,
- Tcl_NewStringObj(pltcl_get_condition_name(edata->sqlerrcode), -1));
+ Tcl_NewStringObj(pltcl_get_condition_name(edata->sqlerrcode), -1));
Tcl_ListObjAppendElement(interp, obj,
Tcl_NewStringObj("message", -1));
UTF_BEGIN;
@@ -1828,7 +1828,7 @@ pltcl_construct_errorCode(Tcl_Interp *interp, ErrorData *edata)
Tcl_NewStringObj("detail", -1));
UTF_BEGIN;
Tcl_ListObjAppendElement(interp, obj,
- Tcl_NewStringObj(UTF_E2U(edata->detail), -1));
+ Tcl_NewStringObj(UTF_E2U(edata->detail), -1));
UTF_END;
}
if (edata->hint)
@@ -1846,7 +1846,7 @@ pltcl_construct_errorCode(Tcl_Interp *interp, ErrorData *edata)
Tcl_NewStringObj("context", -1));
UTF_BEGIN;
Tcl_ListObjAppendElement(interp, obj,
- Tcl_NewStringObj(UTF_E2U(edata->context), -1));
+ Tcl_NewStringObj(UTF_E2U(edata->context), -1));
UTF_END;
}
if (edata->schema_name)
@@ -1855,7 +1855,7 @@ pltcl_construct_errorCode(Tcl_Interp *interp, ErrorData *edata)
Tcl_NewStringObj("schema", -1));
UTF_BEGIN;
Tcl_ListObjAppendElement(interp, obj,
- Tcl_NewStringObj(UTF_E2U(edata->schema_name), -1));
+ Tcl_NewStringObj(UTF_E2U(edata->schema_name), -1));
UTF_END;
}
if (edata->table_name)
@@ -1864,7 +1864,7 @@ pltcl_construct_errorCode(Tcl_Interp *interp, ErrorData *edata)
Tcl_NewStringObj("table", -1));
UTF_BEGIN;
Tcl_ListObjAppendElement(interp, obj,
- Tcl_NewStringObj(UTF_E2U(edata->table_name), -1));
+ Tcl_NewStringObj(UTF_E2U(edata->table_name), -1));
UTF_END;
}
if (edata->column_name)
@@ -1873,7 +1873,7 @@ pltcl_construct_errorCode(Tcl_Interp *interp, ErrorData *edata)
Tcl_NewStringObj("column", -1));
UTF_BEGIN;
Tcl_ListObjAppendElement(interp, obj,
- Tcl_NewStringObj(UTF_E2U(edata->column_name), -1));
+ Tcl_NewStringObj(UTF_E2U(edata->column_name), -1));
UTF_END;
}
if (edata->datatype_name)
@@ -1882,7 +1882,7 @@ pltcl_construct_errorCode(Tcl_Interp *interp, ErrorData *edata)
Tcl_NewStringObj("datatype", -1));
UTF_BEGIN;
Tcl_ListObjAppendElement(interp, obj,
- Tcl_NewStringObj(UTF_E2U(edata->datatype_name), -1));
+ Tcl_NewStringObj(UTF_E2U(edata->datatype_name), -1));
UTF_END;
}
if (edata->constraint_name)
@@ -1891,7 +1891,7 @@ pltcl_construct_errorCode(Tcl_Interp *interp, ErrorData *edata)
Tcl_NewStringObj("constraint", -1));
UTF_BEGIN;
Tcl_ListObjAppendElement(interp, obj,
- Tcl_NewStringObj(UTF_E2U(edata->constraint_name), -1));
+ Tcl_NewStringObj(UTF_E2U(edata->constraint_name), -1));
UTF_END;
}
/* cursorpos is never interesting here; report internal query/pos */
@@ -1901,7 +1901,7 @@ pltcl_construct_errorCode(Tcl_Interp *interp, ErrorData *edata)
Tcl_NewStringObj("statement", -1));
UTF_BEGIN;
Tcl_ListObjAppendElement(interp, obj,
- Tcl_NewStringObj(UTF_E2U(edata->internalquery), -1));
+ Tcl_NewStringObj(UTF_E2U(edata->internalquery), -1));
UTF_END;
}
if (edata->internalpos > 0)
@@ -1917,7 +1917,7 @@ pltcl_construct_errorCode(Tcl_Interp *interp, ErrorData *edata)
Tcl_NewStringObj("filename", -1));
UTF_BEGIN;
Tcl_ListObjAppendElement(interp, obj,
- Tcl_NewStringObj(UTF_E2U(edata->filename), -1));
+ Tcl_NewStringObj(UTF_E2U(edata->filename), -1));
UTF_END;
}
if (edata->lineno > 0)
@@ -1933,7 +1933,7 @@ pltcl_construct_errorCode(Tcl_Interp *interp, ErrorData *edata)
Tcl_NewStringObj("funcname", -1));
UTF_BEGIN;
Tcl_ListObjAppendElement(interp, obj,
- Tcl_NewStringObj(UTF_E2U(edata->funcname), -1));
+ Tcl_NewStringObj(UTF_E2U(edata->funcname), -1));
UTF_END;
}
@@ -2038,7 +2038,7 @@ pltcl_argisnull(ClientData cdata, Tcl_Interp *interp,
if (fcinfo == NULL)
{
Tcl_SetObjResult(interp,
- Tcl_NewStringObj("argisnull cannot be used in triggers", -1));
+ Tcl_NewStringObj("argisnull cannot be used in triggers", -1));
return TCL_ERROR;
}
@@ -2091,7 +2091,7 @@ pltcl_returnnull(ClientData cdata, Tcl_Interp *interp,
if (fcinfo == NULL)
{
Tcl_SetObjResult(interp,
- Tcl_NewStringObj("return_null cannot be used in triggers", -1));
+ Tcl_NewStringObj("return_null cannot be used in triggers", -1));
return TCL_ERROR;
}
@@ -2125,7 +2125,7 @@ pltcl_returnnext(ClientData cdata, Tcl_Interp *interp,
if (fcinfo == NULL)
{
Tcl_SetObjResult(interp,
- Tcl_NewStringObj("return_next cannot be used in triggers", -1));
+ Tcl_NewStringObj("return_next cannot be used in triggers", -1));
return TCL_ERROR;
}
@@ -2187,7 +2187,7 @@ pltcl_returnnext(ClientData cdata, Tcl_Interp *interp,
elog(ERROR, "wrong result type supplied in return_next");
retval = InputFunctionCall(&prodesc->result_in_func,
- utf_u2e((char *) Tcl_GetString(objv[1])),
+ utf_u2e((char *) Tcl_GetString(objv[1])),
prodesc->result_typioparam,
-1);
tuplestore_putvalues(call_state->tuple_store, call_state->ret_tupdesc,
@@ -2322,7 +2322,7 @@ pltcl_SPI_execute(ClientData cdata, Tcl_Interp *interp,
if (++i >= objc)
{
Tcl_SetObjResult(interp,
- Tcl_NewStringObj("missing argument to -count or -array", -1));
+ Tcl_NewStringObj("missing argument to -count or -array", -1));
return TCL_ERROR;
}
@@ -2360,7 +2360,7 @@ pltcl_SPI_execute(ClientData cdata, Tcl_Interp *interp,
{
UTF_BEGIN;
spi_rc = SPI_execute(UTF_U2E(Tcl_GetString(objv[query_idx])),
- pltcl_current_call_state->prodesc->fn_readonly, count);
+ pltcl_current_call_state->prodesc->fn_readonly, count);
UTF_END;
my_rc = pltcl_process_SPI_result(interp,
@@ -2695,7 +2695,7 @@ pltcl_SPI_execute_plan(ClientData cdata, Tcl_Interp *interp,
if (i >= objc)
{
Tcl_SetObjResult(interp,
- Tcl_NewStringObj("missing argument to -count or -array", -1));
+ Tcl_NewStringObj("missing argument to -count or -array", -1));
return TCL_ERROR;
}
@@ -2719,7 +2719,7 @@ pltcl_SPI_execute_plan(ClientData cdata, Tcl_Interp *interp,
{
Tcl_SetObjResult(interp,
Tcl_NewStringObj(
- "length of nulls string doesn't match number of arguments",
+ "length of nulls string doesn't match number of arguments",
-1));
return TCL_ERROR;
}
@@ -2735,7 +2735,7 @@ pltcl_SPI_execute_plan(ClientData cdata, Tcl_Interp *interp,
{
Tcl_SetObjResult(interp,
Tcl_NewStringObj(
- "argument list length doesn't match number of arguments for query"
+ "argument list length doesn't match number of arguments for query"
,-1));
return TCL_ERROR;
}
@@ -2753,7 +2753,7 @@ pltcl_SPI_execute_plan(ClientData cdata, Tcl_Interp *interp,
{
Tcl_SetObjResult(interp,
Tcl_NewStringObj(
- "argument list length doesn't match number of arguments for query"
+ "argument list length doesn't match number of arguments for query"
,-1));
return TCL_ERROR;
}
@@ -2803,7 +2803,7 @@ pltcl_SPI_execute_plan(ClientData cdata, Tcl_Interp *interp,
{
UTF_BEGIN;
argvalues[j] = InputFunctionCall(&qdesc->arginfuncs[j],
- UTF_U2E(Tcl_GetString(callObjv[j])),
+ UTF_U2E(Tcl_GetString(callObjv[j])),
qdesc->argtypioparams[j],
-1);
UTF_END;
@@ -2814,7 +2814,7 @@ pltcl_SPI_execute_plan(ClientData cdata, Tcl_Interp *interp,
* Execute the plan
************************************************************/
spi_rc = SPI_execute_plan(qdesc->plan, argvalues, nulls,
- pltcl_current_call_state->prodesc->fn_readonly,
+ pltcl_current_call_state->prodesc->fn_readonly,
count);
my_rc = pltcl_process_SPI_result(interp,
@@ -3046,7 +3046,7 @@ pltcl_build_tuple_argument(HeapTuple tuple, TupleDesc tupdesc)
UTF_END;
UTF_BEGIN;
Tcl_ListObjAppendElement(NULL, retobj,
- Tcl_NewStringObj(UTF_E2U(outputstr), -1));
+ Tcl_NewStringObj(UTF_E2U(outputstr), -1));
UTF_END;
pfree(outputstr);
}
@@ -3097,7 +3097,7 @@ pltcl_build_tuple_result(Tcl_Interp *interp, Tcl_Obj **kvObjv, int kvObjc,
if (kvObjc % 2 != 0)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("column name/value list must have even number of elements")));
+ errmsg("column name/value list must have even number of elements")));
for (i = 0; i < kvObjc; i += 2)
{