OSDN Git Service

Modify COPY FROM to match the null-value string against the column value
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 6 Oct 2003 02:38:53 +0000 (02:38 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 6 Oct 2003 02:38:53 +0000 (02:38 +0000)
commit0eceaaf9b7d03f88c82f27b1e51e9e75bb7ab4ff
treec25dd2708e0801dc5c5ed5bdc61ef653af8b5458
parent351adb8dfb432526f8a54838b5e708dba4e3030d
Modify COPY FROM to match the null-value string against the column value
before it is de-backslashed, not after.  This allows the null string \N
to be reliably distinguished from the data value \N (which must be
represented as \\N).  Per bug report from Manfred Koizar ... but it's
amazing this hasn't been reported before ...
Also, be consistent about encoding conversion for null string: the form
specified in the command is in the server encoding, but what is sent
to/from client must be in client encoding.  This never worked quite
right before either.
doc/src/sgml/ref/copy.sgml
src/backend/commands/copy.c