Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> text is not bytea.
Indeed. I wonder whether we shouldn't tweak the SQL string literal
parser to reject \000, because AFAICS that isn't going to do anything
useful for any datatype, and it leads to what are at best questionable
results. (bytea's processing of \000 happens somewhere further
downstream, and wouldn't be affected.)
regards, tom lane