- publishing free software manuals
PostgreSQL Reference Manual - Volume 3 - Server Administration Guide
by The PostgreSQL Global Development Group
Paperback (6"x9"), 204 pages
ISBN 0954612043
RRP £13.95 ($24.95)

Sales of this book support the PostgreSQL project! Get a printed copy>>>

2 Client-Only Installation on Windows

Although a complete PostgreSQL installation for Windows can only be built using MinGW or Cygwin, the C client library (libpq) and the interactive terminal (psql) can be compiled using other Windows tool sets. Makefiles are included in the source distribution for Microsoft Visual C++ and Borland C++. It should be possible to compile the libraries manually for other configurations.

Tip: Using MinGW or Cygwin is preferred. If using one of those tool sets, see section 1 Installation Instructions.

To build everything that you can on Windows using Microsoft Visual C++, change into the ‘src’ directory and type the command

nmake /f win32.mak

This assumes that you have Visual C++ in your path.

To build everything using Borland C++, change into the ‘src’ directory and type the command

make -N -DCFG=Release /f bcc32.mak

The following files will be built:

‘interfaces\libpq\Release\libpq.dll’
The dynamically linkable frontend library
‘interfaces\libpq\Release\libpqdll.lib’
Import library to link your programs to ‘libpq.dll’
‘interfaces\libpq\Release\libpq.lib’
Static version of the frontend library
‘bin\pg_config\Release\pg_config.exe’
‘bin\psql\Release\psql.exe’
‘bin\pg_dump\Release\pg_dump.exe’
‘bin\pg_dump\Release\pg_dumpall.exe’
‘bin\pg_dump\Release\pg_restore.exe’
‘bin\scripts\Release\clusterdb.exe’
‘bin\scripts\Release\createdb.exe’
‘bin\scripts\Release\createuser.exe’
‘bin\scripts\Release\createlang.exe’
‘bin\scripts\Release\dropdb.exe’
‘bin\scripts\Release\dropuser.exe’
‘bin\scripts\Release\droplang.exe’
‘bin\scripts\Release\vacuumdb.exe’
‘bin\scripts\Release\reindexdb.exe’
The PostgreSQL client applications and utilities.

Normally you do not need to install any of the client files. You should place the ‘libpq.dll’ file in the same directory as your applications .EXE-file. Only if this is for some reason not possible should you install it in the ‘WINNT\SYSTEM32’ directory (or in ‘WINDOWS\SYSTEM’ on a Windows 95/98/ME system). If this file is installed using a setup program, it should be installed with version checking using the VERSIONINFO resource included in the file, to ensure that a newer version of the library is not overwritten.

If you plan to do development using libpq on this machine, you will have to add the ‘src\include’ and ‘src\interfaces\libpq’ subdirectories of the source tree to the include path in your compiler's settings.

To use the library, you must add the ‘libpqdll.lib’ file to your project. (In Visual C++, just right-click on the project and choose to add it.)

ISBN 0954612043PostgreSQL Reference Manual - Volume 3 - Server Administration GuideSee the print edition