Re: Re : Win32 binaries test / pg_dump problem
От | Cyril VELTER |
---|---|
Тема | Re: Re : Win32 binaries test / pg_dump problem |
Дата | |
Msg-id | 0cd501c444d6$91598630$dc01a8c0@lodgis.net обсуждение исходный текст |
Ответ на | Re: Re : Win32 binaries test / pg_dump problem ("Cyril VELTER" <cyril.velter@metadys.com>) |
Список | pgsql-hackers-win32 |
----- Original Message ----- From: "Andrew Dunstan" <andrew@dunslane.net> > Cyril VELTER said: > > From: "Andrew Dunstan" <andrew@dunslane.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).
В списке pgsql-hackers-win32 по дате отправления: