Literal NUL using COPY TO - Mailing list pgsql-general

From François Beausoleil
Subject Literal NUL using COPY TO
Date
Msg-id 94231212-5E0B-465F-A14E-F42CB7DEA2FA@teksol.info
Whole thread Raw
Responses Re: Literal NUL using COPY TO  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
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) to stdout with (format csv, delimiter E'\000', header false);
ERROR:  invalid byte sequence for encoding "UTF8": 0x00

The archives of this list don't seem to have anything interesting, and Google doesn't either.

Thanks!
François

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Problem with aborting entire transactions on error
Next
From: Dan S
Date:
Subject: Bug in GET STACKED DIAGNOSTICS ?