Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Re : Win32 binaries test / pg_dump problem


  • From: "Andrew Dunstan" <andrew(at)dunslane(dot)net>
  • To: <pgsql-hackers-win32(at)postgresql(dot)org>
  • Subject: Re: Re : Win32 binaries test / pg_dump problem
  • Date: Fri, 28 May 2004 07:04:05 -0400 (EDT)
  • Message-id: <1207(dot)24(dot)211(dot)141(dot)25(dot)1085742245(dot)squirrel(at)www(dot)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.
>>
>
>    you might be right, I just found some information on msdn that fseek
>    for
> example is influenced by ctrl-z when the file is opened in text mode.
>
>    I'm not sure that this is the cause of the second problem (backend
>    crash
> on copy to) though.
>
>    do you known where this modification needs to be done ?
>
>    cyril
>

probably in src/bin/psql/command.c::process_file()

instead of mode "r" we should probably use the predefined constant
PG_BINARY_R

cheers

andrew







Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group