"Jim C. Nasby" <[EMAIL PROTECTED]> writes: > However, the test right above that means that we'll fail if the user > tries something like "row_variable := NULL;":
The patch you seem to have in mind would allow row_variable := int_variable; to succeed if the int_variable chanced to contain NULL, which is surely not very desirable. The real issue here is that the bare NULL has type UNKNOWN and we're not making any effort to cast it. I'm not sure whether it'd work to simply apply exec_cast_value --- that looks like it's only meant to handle scalars, where in general you'd need something close to ExecEvalConvertRowtype(). > Of course, setting a row variable to null is a lot more useful if we can > actually test for it after the fact, and I'm not really sure how to make > that happen. Doesn't IS NULL work (as of CVS HEAD)? regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org