Re: [GENERAL] Literal NUL using COPY TO

2012-12-10 Thread Tom Lane
=?iso-8859-1?Q?Fran=E7ois_Beausoleil?= writes: > Can one use COPY TO stdout to output a literal NUL byte as the delimiter? No. Postgres doesn't allow embedded NULs in text strings in general. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@post

[GENERAL] Literal NUL using COPY TO

2012-12-10 Thread François Beausoleil
Can one use COPY TO stdout to output a literal NUL byte as the delimiter? # \encoding UTF8 # copy (select * from q limit 1) to stdout with (format csv, delimiter E'\000', header false); ERROR: invalid byte sequence for encoding "UTF8": 0x00 # \encoding sql_ascii # copy (select * from q limit 1)