2 Compiling PostgreSQL On Native Win32 FAQ
4 Last updated: Thu Oct 14 18:22:57 EDT 2004
6 Current maintainer: Bruce Momjian <bruce@momjian.us>
8 The most recent version of this document can be viewed at
9 http://www.postgresql.org/docs/faqs.FAQ_MINGW.html.
11 The FAQ Running & Installing PostgreSQL On Native Windows is at
12 http://pginstaller.projects.postgresql.org/faq/FAQ_windows.html.
14 The native Win32 port is built from source using MinGW tools. There
15 is also a precompiled binary installer called pginstaller which you
16 can find at from http://pgfoundry.org/projects/pginstaller. It is a
17 fully native build and uses no additional software like MinGW. The
18 ready-made installer files are available on the main PostgreSQL ftp
19 servers in the binary/win32 directory.
21 Tools for Building Binaries
23 The native Win32 port requires a 32-bit NT-based Microsoft operating
24 system, like Windows NT 4, Windows 2000/2003, or Windows XP. (NT 4 is
25 no longer supported since version 8.2) Earlier operating systems do
26 not have sufficient infrastructure. Building the port also requires
27 MinGW and Msys, which can be downloaded from http://www.mingw.org/.
28 MinGW is a Unix-like build environment for Microsoft operating
29 systems. Msys is a collection of unix tools required to run shell
30 scripts like configure. Neither is required to run the resulting
31 binaries; they are needed only for creating the binaries. Work is in
32 progress to support building using Visual C++ in a future version.
34 Steps For Building Binaries
36 * Download the nightly snapshot tarball from
37 ftp://ftp.postgresql.org/pub/dev or checkout via CVS (you will
38 need bison, flex, and perl installed to build from CVS)
39 * Run configure (you might need to add the --without-zlib argument,
40 depending on whether you have installed zlib on MinGW)
43 Note: it is suggested that you run psql under CMD.EXE., as the Msys
44 console has buffering issues.
45 If you make a change that you want to contribute, make a context diff
46 and send it to the mailing list.
50 There are several resources that helped us complete this port:
51 * PeerDirect port of PostgreSQL 7.2 to Win32
53 * SRA port of PostgreSQL to Win32 (unfortunately, this is not
54 * pgAdmin3 CHM help files