"Michael Richards" <michael(at)fastmail(dot)ca> writes:> Shouldn't all casts be able to handle the case where it is NULL?
Yup, it's a bug. It's fixed in current sources.
regards, tom lane