here are the patches for psql on Win32:
commite6a16c1777053fb70dbbfe3a7b082ad41d6f0765
authormomjian <momjian>
Sun, 27 Jul 2003 03:32:26 +0000 (27 03:32 +0000)
committermomjian <momjian>
Sun, 27 Jul 2003 03:32:26 +0000 (27 03:32 +0000)
tree3f2107ae71adc269d91f06a6c7cdc6f79cd38393
parent63f798b260474e2c1090b5f16df65482be5c2288
here are the patches for psql on Win32:

  psql4win32.patch  - changes in the psql source code
  psql-ref.patch    - changes in the documentation psql-ref.sgml
                      (for new builtin variable WIN32_CONSOLE)

To apply them use "patch -p 1" in the root directory of the
postgres source directory.

These patches fix the following problems of psql on Win32
(all changes only have effect #ifdef WIN32):

  a) Problem:  Static library libpq.a did not work
     Solution: Added WSAStartup() in fe-connect.c

  b) Problem:  Secret Password was echoed by psql
     Solution: Password echoing disabled in sprompt.c

  c) Problem:  8bit characters were displayed/interpreted wrong in psql
               This is due to the fact that the Win32 "console" uses a
               different encoding than the rest of the Windows system
     Solution: Introduced a new psql variable WIN32_CONSOLE
               When set with "\set WIN32_console", the function OemToChar()
               is applied after reading input and CharToOem() before
               displaying Output

Christoph Dalitz
doc/src/sgml/ref/psql-ref.sgml
src/bin/psql/describe.c
src/bin/psql/input.c
src/bin/psql/mbprint.c
src/bin/psql/sprompt.c
src/interfaces/libpq/fe-connect.c