- compile the libraries manually for other configurations.
+ or extensions.
+ linked applications built using these tools.
+ configuration options you want set, including the paths to libraries used.
+ are available in.
+ or Cygwin perl will not work. It must also be present in the PATH.
+
+
+
+ Required for Kerberos authentication support. MIT Kerberos can be
+ downloaded from
+
+
+
+
+ Required for XML support. Binaries can be downloaded from
+
>. Note that libxml2 requires iconv,
+ which is available from the same download location.
+
+
+
+
+ Required for SSL support. Binaries can be downloaded from
+
+
+
+
+ Required for building the
ECPG libraries.
+ Binaries can be downloaded from
+
+
+
+
+ Required for building
PL/Python. Binaries can
+
+
+
+
+ Required for compression support in
pg_dump
+ and
pg_restore. Binaries can be downloaded
+
+
+
+
+
+
+
+
+
Building
+
+ To build all of PostgreSQL in debug configuration (the default), run the
+ command:
+
+
+ build
+
+
+ To build all of PostgreSQL in release configuration, run the command:
+
+
+ build RELEASE
+
+
+ To build just a single project, for example psql, run the commands:
+
+
+ build psql
+
+
+ build RELEASE psql
+
+
+
+
-
Cygwin is preferred. If using one of
- those tool sets, see .
+ It is also possible to build from inside the Visual Studio GUI. In this
+ case, you need to run:
+
+
+ perl mkvcbuild.pl
+
+
+ from the command prompt, and then open the generated
+ pgsql.sln (in the root directory of the source tree)
+ in Visual Studio.
-
+
+
+
+
Cleaning and installing
+
+ Most of the time, the automatic dependency tracking in Visual Studio will
+ handle changed files. But if there have been large changes, you may need
+ to clean the installation. To do this, simply run the
+ clean.bat command, which will automatically clean out
+ all generated files.
+
+
+ By default, all files are written into a subdirectory of the
+ debug or release directories. To
+ install these files using the standard layout, and also generate the files
+ required to initialize and use the database, run the command:
+
+
+ perl install.pl c:\destination\directory
+
+
+
+
+
+
+
Building the documentation
+
+ Building the PostgreSQL documentation in HTML format requires several tools
+ and files. Create a root directory for all these files, and store them
+ in the subdirectories in the list below.
+
+
+ OpenJade 1.3.1-2
+ Download from
+ and uncompress in the subdirectory openjade-1.3.1.
+
+
+
+
+ DocBook DTD 4.2
+ Download from
+ and uncompress in the subdirectory docbook.
+
+
+
+
+ DocBook DSSL 1.79
+ Download from
+ and uncompress in the subdirectory
+ docbook-dsssl-1.79.
+
+
+
+
+ ISO character entities
+ Download from
+ uncompress in the subdirectory docbook.
+
+
+
+ Edit the buildenv.bat file, and add a variable for the
+ location of the root directory, for example:
+
+ @ECHO OFF
+ SET DOCROOT=c:\docbook
+
+ To build the documentation, run the command
+ builddoc.bat. Note that this will actually run the
+ build twice, in order to generate the indexes. The generated HTML files
+ will be in doc\src\sgml.
+
+
+
+
+
+
- To build everything that you can on
Windows
- using
Microsoft Visual C++, change into the
+ Using
Visual Studio 6.0 or
+
Borland C++ to build libpq is only recommended
+ if you need a version with different debug/release flags, or if you need a
+ static library to link into an application. For normal use the
+
Visual Studio 2005 version is recommended.
+
+
+ To build the
libpq client library using
+
Visual Studio 6.0, 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
+ To build
the libpq client library using
+
Borland C++, change into the
+ src directory and type the command
make -N -DCFG=Release /f bcc32.mak
+
+
Generated files
The following files will be built:
-
- 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
+ as your applications executable file. Do not install
+ libpq.dll into your Windows, System or System32
+ directory unless absolutely necessary.
+ 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
+ If you
are planning to do development using
libpq
on this machine, you will have to add the
src\include and
src\interfaces\libpq subdirectories of the source
libpqdll.lib file to your project. (In Visual
C++, just right-click on the project and choose to add it.)
-
- Free development tools from
Microsoft
- can be downloaded from
- You will also need MSVCRT.lib> from the platform SDK from
- You can also download the
.NET> framework from
- Once installed, the toolkit binaries must be in your path, and you might
- need to add a /lib:<libpath>> to point to MSVCRT.lib>.
- Free
Borland C++ compiler tools can be downloaded from
- and require similar setup.
-
+
+