diff options
Diffstat (limited to 'src/pl')
| -rw-r--r-- | src/pl/plperl/plperl.c | 7 | ||||
| -rw-r--r-- | src/pl/tcl/pltcl.c | 11 |
2 files changed, 7 insertions, 11 deletions
diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c index 4d993e7371d..461986cda31 100644 --- a/src/pl/plperl/plperl.c +++ b/src/pl/plperl/plperl.c @@ -1062,11 +1062,16 @@ plperl_build_tuple_result(HV *perlhash, TupleDesc td) char *key = hek2cstr(he); int attn = SPI_fnumber(td, key); - if (attn <= 0 || td->attrs[attn - 1]->attisdropped) + if (attn == SPI_ERROR_NOATTRIBUTE) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), errmsg("Perl hash contains nonexistent column \"%s\"", key))); + if (attn <= 0) + ereport(ERROR, + (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("cannot set system attribute \"%s\"", + key))); values[attn - 1] = plperl_sv_to_datum(val, td->attrs[attn - 1]->atttypid, diff --git a/src/pl/tcl/pltcl.c b/src/pl/tcl/pltcl.c index 3e52113ee25..20809102efb 100644 --- a/src/pl/tcl/pltcl.c +++ b/src/pl/tcl/pltcl.c @@ -603,6 +603,7 @@ pltcl_init_load_unknown(Tcl_Interp *interp) * leave this code as DString - it's only executed once per session ************************************************************/ fno = SPI_fnumber(SPI_tuptable->tupdesc, "modsrc"); + Assert(fno > 0); Tcl_DStringInit(&unknown_src); @@ -1260,12 +1261,6 @@ pltcl_trigger_handler(PG_FUNCTION_ARGS, pltcl_call_state *call_state, ret_name))); /************************************************************ - * Ignore dropped columns - ************************************************************/ - if (tupdesc->attrs[attnum - 1]->attisdropped) - continue; - - /************************************************************ * Lookup the attribute type's input function ************************************************************/ getTypeInputInfo(tupdesc->attrs[attnum - 1]->atttypid, @@ -3077,10 +3072,6 @@ pltcl_build_tuple_result(Tcl_Interp *interp, Tcl_Obj **kvObjv, int kvObjc, errmsg("cannot set system attribute \"%s\"", fieldName))); - /* Ignore dropped attributes */ - if (call_state->ret_tupdesc->attrs[attn - 1]->attisdropped) - continue; - values[attn - 1] = utf_e2u(Tcl_GetString(kvObjv[i + 1])); } |
