Re: [BUG] psql: Make \copy from 'text' and 'csv' formats fail on NUL bytes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Joel Jacobson" <joel(at)compiler(dot)org>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [BUG] psql: Make \copy from 'text' and 'csv' formats fail on NUL bytes
Date: 2024-11-10 21:37:12
Message-ID: 159991.1731274632@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Joel Jacobson" <joel(at)compiler(dot)org> writes:
> Fix by adjusting handleCopyIn() to use the binary code path also when the copy
> source is a file (i.e., copystream != pset.cur_cmd_source), even in textual
> copies.

That seems like a hack, as it also changes the behavior w.r.t.
prompts and EOF-mark detection, neither for the better.

I'm not really convinced that we need to do anything at all
about this.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2024-11-10 21:41:33 Re: index prefetching
Previous Message Heikki Linnakangas 2024-11-10 21:30:13 Re: Interrupts vs signals