Re: Untrusted PL/Tcl?

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jan Wieck <JanWieck@Yahoo.com>
Cc: PostgreSQL HACKERS <pgsql-hackers@postgresql.org>
Date: 2000-07-18T14:52:20Z
Lists: pgsql-hackers
JanWieck@t-online.de (Jan Wieck) writes:
>     Should  I  go  for  it and if so, how should this language be
>     named?

Sounds like a fine idea.

While you're in there, do you want to do something about supporting NULL
inputs and results properly?  Right now, a NULL input comes into a pltcl
function as an empty string, which is OK as far as it goes but you can't
always tell that from a valid data value.  There should be an inquiry
function to tell whether argument N is-null or not.  Also, AFAICT
there's no way for a pltcl function to return a NULL.  The most natural
Tcl syntax for this would be something like
	return -code null
but I'm not sure how hard it is to persuade the Tcl interpreter to
accept a new "-code" keyword without actually changing the Tcl core.
Worst-case, we could invent a new statement "return_null" ...

			regards, tom lane