BTW, I'm sure this was discussed but I forgot the conclusion: shouldchr(0) throw an error? If we're trying to get rid of embedded-nullproblems, seems it must.
regards, tom lane