Re: [HACKERS] [Fwd: Re: [pgsql-hackers-win32] Import from Linux to

2004-08-15 Thread Andrew Dunstan
Andrew Dunstan said: Bruce Momjian wrote: One issue is that pre-8.0, psql files were opened in Win32 text mode, so we wouldn't have seen this bug on Win32, but we would on Linux. Because we open them on Win32 now in binary mode so we see control-Z it will show up on Win32 too. true, *BUT*

Re: [HACKERS] [Fwd: Re: [pgsql-hackers-win32] Import from Linux to

2004-08-15 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: There's another question this bug raises, though. Why doesn't the server protest when it sees more copy data passed in after it sees the end marker? Whether it did or not would make not the slightest bit of difference, since (without the patch) psql

Re: [HACKERS] [Fwd: Re: [pgsql-hackers-win32] Import from Linux to

2004-08-15 Thread Andrew Dunstan
Tom Lane wrote: Andrew Dunstan [EMAIL PROTECTED] writes: There's another question this bug raises, though. Why doesn't the server protest when it sees more copy data passed in after it sees the end marker? Whether it did or not would make not the slightest bit of difference, since

Re: [HACKERS] [Fwd: Re: [pgsql-hackers-win32] Import from Linux to

2004-08-15 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: Surely sending copy data after the end marker is sent should be an error. I'm unconvinced. For example, this would force a client to parse the contents of a file it's shipping over, rather than just pushing the file verbatim and then unconditionally

Re: [HACKERS] [Fwd: Re: [pgsql-hackers-win32] Import from Linux to

2004-08-14 Thread Andrew Dunstan
Tom Lane wrote: Andrew Dunstan [EMAIL PROTECTED] writes: No, I think 7.4 should do. 7.3 users will still have the dos2unix workaround available. Are you going to do the 7.4 patch, or do you need me to? I normally only keep a HEAD tree checked out. A quick look at the cvsweb diffs suggests the

Re: [HACKERS] [Fwd: Re: [pgsql-hackers-win32] Import from Linux to

2004-08-14 Thread Bruce Momjian
Andrew Dunstan wrote: Tom Lane wrote: Andrew Dunstan [EMAIL PROTECTED] writes: No, I think 7.4 should do. 7.3 users will still have the dos2unix workaround available. Are you going to do the 7.4 patch, or do you need me to? I normally only keep a HEAD tree checked out. A quick

Re: [HACKERS] [Fwd: Re: [pgsql-hackers-win32] Import from Linux to

2004-08-14 Thread Andrew Dunstan
Bruce Momjian wrote: One issue is that pre-8.0, psql files were opened in Win32 text mode, so we wouldn't have seen this bug on Win32, but we would on Linux. Because we open them on Win32 now in binary mode so we see control-Z it will show up on Win32 too. true, *BUT* The patch is not

Re: [HACKERS] [Fwd: Re: [pgsql-hackers-win32] Import from Linux to

2004-08-14 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: The patch is not platform-specific. It simply makes psql accept the same line endings on COPY FROM that the backend will accept - in effect it makes it line-end agnostic - this is a Good Thing (tm). Strictly speaking it's not there yet --- psql still

[HACKERS] [Fwd: Re: [pgsql-hackers-win32] Import from Linux to Windows]

2004-08-13 Thread Andrew Dunstan
[redirecting] I have abstracted this problem, and we definitely have a newline bug that has to be fixed, IMNSHO. Attached are 2 scripts that are identical except that one has DOS-style line endings and one has Unix style line endings. The DOS-style just fails miserably with no warning. It's

Re: [HACKERS] [Fwd: Re: [pgsql-hackers-win32] Import from Linux to Windows]

2004-08-13 Thread Andrew Dunstan
Andrew Dunstan wrote: The attached patch appears to solve the problem. However, while it makes us conform to the first sentence below from the docs, it doesn't comply with the second. Not sure what to do about that. Maybe there's a better solution? Attached patch seems much better, I think.

Re: [HACKERS] [Fwd: Re: [pgsql-hackers-win32] Import from Linux to Windows]

2004-08-13 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: The attached patch appears to solve the problem. However, while it makes us conform to the first sentence below from the docs, it doesn't comply with the second. Not sure what to do about that. Maybe there's a better solution? Attached patch seems

Re: [HACKERS] [Fwd: Re: [pgsql-hackers-win32] Import from Linux to

2004-08-13 Thread Andrew Dunstan
Tom Lane wrote: Andrew Dunstan [EMAIL PROTECTED] writes: The attached patch appears to solve the problem. However, while it makes us conform to the first sentence below from the docs, it doesn't comply with the second. Not sure what to do about that. Maybe there's a better solution?

Re: [HACKERS] [Fwd: Re: [pgsql-hackers-win32] Import from Linux to

2004-08-13 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: Should it be backported for the upcoming stable release(s)? Bruce and I were discussing this earlier. Probably a good idea, since we do support psql on Windows even in the older releases. My personal opinion is to back-port only as far as 7.4, but if

Re: [HACKERS] [Fwd: Re: [pgsql-hackers-win32] Import from Linux to

2004-08-13 Thread Andrew Dunstan
Tom Lane said: Andrew Dunstan [EMAIL PROTECTED] writes: Should it be backported for the upcoming stable release(s)? Bruce and I were discussing this earlier. Probably a good idea, since we do support psql on Windows even in the older releases. My personal opinion is to back-port only as

Re: [HACKERS] [Fwd: Re: [pgsql-hackers-win32] Import from Linux to

2004-08-13 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: No, I think 7.4 should do. 7.3 users will still have the dos2unix workaround available. Are you going to do the 7.4 patch, or do you need me to? I normally only keep a HEAD tree checked out. A quick look at the cvsweb diffs suggests the patch should