On Thu, 1 Feb 2007, Tom Lane wrote:

Sergiy Vyshnevetskiy <[EMAIL PROTECTED]> writes:
If input function IS strict then nulls are ALWAYS accepted.
If input function IS NOT strict then nulls MIGHT be rejectted.
And the patch is much more simple now (attached).
Is that it?

Almost right.  exec_assign_value() thinks its isNull argument is the
null flag for the *source* value (not sure why it's pass by reference).

Because the value may change during type cast. From null to non-null too.
Or vice-versa. I'll try it later.

As you set it up, var->isnull would be aliased by *isNull, which might
manage to break things within that function if the code were ever
rearranged.

Also, some comments are usually a good idea (if the purpose were
obvious, it'd have been right the first time, no?),

I will, when I'm sure what I'm doing. For now it's mostly "mokey see - monkey do".

and you always need to check the regression tests --- it turns out that the wrong behavior was actually being exposed by the tests.

Hmm? Oh, yeah, I /heard/ something about them ... I think. :)

Patch as-applied is attached.

Excellent. Thanks.

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

              http://archives.postgresql.org

Reply via email to