Re: Untrusted PL/Tcl? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Untrusted PL/Tcl?
Date
Msg-id 17884.963931940@sss.pgh.pa.us
Whole thread Raw
In response to Untrusted PL/Tcl?  (JanWieck@t-online.de (Jan Wieck))
Responses Re: Untrusted PL/Tcl?  (JanWieck@t-online.de (Jan Wieck))
List 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 likereturn -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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: TOAST vs arrays
Next
From: Tom Lane
Date:
Subject: Re: FlushRelationBuffers returned -2