COPY FROM STDIN behaviour on end-of-file

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: COPY FROM STDIN behaviour on end-of-file
Date: 2017-05-15 22:40:00
Message-ID: CAEepm=0MCGfYf=JAMiYhO6JPtv9-3ZfBo8fcGeCZ8oMzaw+Z+Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi hackers,

I you hit ^d while COPY FROM STDIN is reading then subsequent COPY
FROM STDIN commands return immediately. That's because we never clear
the end-of-file state on the libc FILE. Shouldn't we do that, perhaps
with something like the attached?

--
Thomas Munro
http://www.enterprisedb.com

Attachment Content-Type Size
clear-copy-stream-eof.patch application/octet-stream 393 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-05-15 23:57:21 Re: Receive buffer size for the statistics socket
Previous Message Tom Lane 2017-05-15 22:05:46 src/test/ssl/t/001_ssltests.pl should not tromp on file permissions