From: | "Cyril VELTER" <cyril(dot)velter(at)metadys(dot)com> |
---|---|
To: | "Andrew Dunstan" <andrew(at)dunslane(dot)net>, <pgsql-hackers-win32(at)postgresql(dot)org> |
Subject: | Re: Re : Win32 binaries test / pg_dump problem |
Date: | 2004-05-28 17:09:41 |
Message-ID: | 0cd501c444d6$91598630$dc01a8c0@lodgis.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers-win32 pgsql-patches |
----- Original Message -----
From: "Andrew Dunstan" <andrew(at)dunslane(dot)net>
> Cyril VELTER said:
> > From: "Andrew Dunstan" <andrew(at)dunslane(dot)net>
> >
> >> Cyril VELTER wrote:
> >>
> >> > if you psql -f test.sql basetest from the windows shell to a
> >> > windows
> > or
> >> > linux database, you'll get a missing data error :
> >> >
> >> > psql:test.sql:9: ERROR: missing data for column "b"
> >> > CONTEXT: COPY test, line 1: "a"
> >> >
> >> > if you psql -f test.sql basetest from a linux shell to a windows
> >> > or
> >> > linux database, you won't get an error
> >>
> >> Sounds like we should have psql open the file in binary mode on
> >> Windows. Would that cause problems? I doubt it, but I wonder.
> >>
>
> probably in src/bin/psql/command.c::process_file()
>
> instead of mode "r" we should probably use the predefined constant
> PG_BINARY_R
OK, that do the trick for that particular case. doing a more test.sql |
psql basetest lead to the same error but psql basetest < test.sql does works
so I think it is a windows shell or "more" problem (cat test.sql | psql
basetest under msys works).
Should I submit a patch, or somebody can commit this change ? (I just
replaced "r" by PG_BINARY_R in src/bin/psql/command.c::process_file().
BTW do you have any idea on the backend crash while doing a copy to
stdout ? (I reduced the case to copying a date column. Will try with a more
recent snapshot).
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-05-28 18:34:51 | Re: Re : Win32 binaries test / pg_dump problem |
Previous Message | efesar (the kay) | 2004-05-28 14:49:43 | Re: [pgsql-advocacy] win32 port getting popular |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-05-28 17:12:09 | Re: Libpq ssl fix |
Previous Message | Tom Lane | 2004-05-28 17:04:47 | Re: thread safety testing fix |