diff options
Diffstat (limited to 'src/pl/plperl/plperl.c')
-rw-r--r-- | src/pl/plperl/plperl.c | 44 |
1 files changed, 22 insertions, 22 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) |