Theo Schlossnagle <jesus(at)omniti(dot)com> writes: > If I return a bytes from perl that looks like: "hello\0there", > postgres sees a 5 byte string "hello". You have failed to pay any attention to the escaping rules for bytea if you do that. regards, tom lane