* pltcl.c - PostgreSQL support for Tcl as
* procedural language (PL)
*
- * $PostgreSQL: pgsql/src/pl/tcl/pltcl.c,v 1.127 2009/01/21 11:13:14 heikki Exp $
+ * $PostgreSQL: pgsql/src/pl/tcl/pltcl.c,v 1.128 2009/06/11 14:49:14 momjian Exp $
*
**********************************************************************/
{
UTF_BEGIN;
retval = InputFunctionCall(&prodesc->result_in_func,
- UTF_U2E((char *) Tcl_GetStringResult(interp)),
+ UTF_U2E((char *) Tcl_GetStringResult(interp)),
prodesc->result_typioparam,
-1);
UTF_END;
{
/*
* Caution is needed here because Tcl_GetVar could overwrite the
- * interpreter result (even though it's not really supposed to),
- * and we can't control the order of evaluation of ereport arguments.
- * Hence, make real sure we have our own copy of the result string
- * before invoking Tcl_GetVar.
+ * interpreter result (even though it's not really supposed to), and we
+ * can't control the order of evaluation of ereport arguments. Hence, make
+ * real sure we have our own copy of the result string before invoking
+ * Tcl_GetVar.
*/
char *emsg;
char *econtext;
free(prodesc);
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("PL/Tcl functions cannot return composite types")));
+ errmsg("PL/Tcl functions cannot return composite types")));
}
perm_fmgr_info(typeStruct->typinput, &(prodesc->result_in_func));
if (level == ERROR)
{
/*
- * We just pass the error back to Tcl. If it's not caught,
- * it'll eventually get converted to a PG error when we reach
- * the call handler.
+ * We just pass the error back to Tcl. If it's not caught, it'll
+ * eventually get converted to a PG error when we reach the call
+ * handler.
*/
Tcl_SetResult(interp, (char *) argv[2], TCL_VOLATILE);
return TCL_ERROR;
}
/*
- * For non-error messages, just pass 'em to elog(). We do not expect
- * that this will fail, but just on the off chance it does, report the
- * error back to Tcl. Note we are assuming that elog() can't have any
- * internal failures that are so bad as to require a transaction abort.
+ * For non-error messages, just pass 'em to elog(). We do not expect that
+ * this will fail, but just on the off chance it does, report the error
+ * back to Tcl. Note we are assuming that elog() can't have any internal
+ * failures that are so bad as to require a transaction abort.
*
* This path is also used for FATAL errors, which aren't going to come
* back to us at all.