Re: [HACKERS] COPY FROM STDIN behaviour on end-of-file

2017-05-17 Thread Tom Lane
Thomas Munro writes: > On Wed, May 17, 2017 at 2:39 PM, Tom Lane wrote: >> Thanks for checking. So that's two major platforms where it works "as >> expected" already. > Ah... the reason this is happening is that BSD-derived fread() >

Re: [HACKERS] COPY FROM STDIN behaviour on end-of-file

2017-05-16 Thread Thomas Munro
On Wed, May 17, 2017 at 2:39 PM, Tom Lane wrote: > Vaishnavi Prabakaran writes: >>> Tom Lane wrote: BTW, it would be a good idea for somebody to check this out on Windows, assuming there's a way to generate a keyboard EOF signal there.

Re: [HACKERS] COPY FROM STDIN behaviour on end-of-file

2017-05-16 Thread Tom Lane
Vaishnavi Prabakaran writes: >> Tom Lane wrote: >>> BTW, it would be a good idea for somebody to check this out on Windows, >>> assuming there's a way to generate a keyboard EOF signal there. > Ctrl-Z + Enter in windows generates EOF signal. I verified this issue

Re: [HACKERS] COPY FROM STDIN behaviour on end-of-file

2017-05-16 Thread Vaishnavi Prabakaran
On Wed, May 17, 2017 at 3:52 AM, Alvaro Herrera wrote: > Tom Lane wrote: > > > BTW, it would be a good idea for somebody to check this out on Windows, > > assuming there's a way to generate a keyboard EOF signal there. > > I last used a Windows command line almost two

Re: [HACKERS] COPY FROM STDIN behaviour on end-of-file

2017-05-16 Thread Alvaro Herrera
Tom Lane wrote: > BTW, it would be a good idea for somebody to check this out on Windows, > assuming there's a way to generate a keyboard EOF signal there. I last used a Windows command line almost two decades ago now, but Ctrl-Z used to do it. -- Álvaro Herrera

Re: [HACKERS] COPY FROM STDIN behaviour on end-of-file

2017-05-16 Thread Tom Lane
Robert Haas writes: > On Tue, May 16, 2017 at 1:29 PM, Tom Lane wrote: >>> I had been supposing that this was a feature addition and should be left >>> for the next commitfest. But given that it already works as-expected on >>> popular platform(s), the

Re: [HACKERS] COPY FROM STDIN behaviour on end-of-file

2017-05-16 Thread Robert Haas
On Tue, May 16, 2017 at 1:29 PM, Tom Lane wrote: > I wrote: >> I had been supposing that this was a feature addition and should be left >> for the next commitfest. But given that it already works as-expected on >> popular platform(s), the fact that it doesn't work the same on

Re: [HACKERS] COPY FROM STDIN behaviour on end-of-file

2017-05-16 Thread Tom Lane
I wrote: > I had been supposing that this was a feature addition and should be left > for the next commitfest. But given that it already works as-expected on > popular platform(s), the fact that it doesn't work the same on some other > platforms seems like a portability bug rather than a missing

Re: [HACKERS] COPY FROM STDIN behaviour on end-of-file

2017-05-16 Thread Tom Lane
Thomas Munro writes: > On Tue, May 16, 2017 at 6:29 PM, Vaishnavi Prabakaran > wrote: >> Hi, I could not reproduce this issue. Even after Ctrl+d , subsequent COPY >> from commands reads the input properly. Is there any specific step

Re: [HACKERS] COPY FROM STDIN behaviour on end-of-file

2017-05-16 Thread Thomas Munro
On Tue, May 16, 2017 at 6:29 PM, Vaishnavi Prabakaran wrote: > On Tue, May 16, 2017 at 8:40 AM, Thomas Munro > wrote: >> >> >> I you hit ^d while COPY FROM STDIN is reading then subsequent COPY >> FROM STDIN commands return

Re: [HACKERS] COPY FROM STDIN behaviour on end-of-file

2017-05-16 Thread Vaishnavi Prabakaran
On Tue, May 16, 2017 at 8:40 AM, Thomas Munro wrote: > > I you hit ^d while COPY FROM STDIN is reading then subsequent COPY > FROM STDIN commands return immediately. Hi, I could not reproduce this issue. Even after Ctrl+d , subsequent COPY from commands reads