blob: dc2b1ff48186367374a73d8b1587df68ade94d89 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 18. Installation from Source Code on Windows</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="prev" href="installation-platform-notes.html" title="17.7. Platform-Specific Notes" /><link rel="next" href="install-windows-full.html" title="18.1. Building with Visual C++ or the Microsoft Windows SDK" /></head><body id="docContent" class="container-fluid col-10"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">Chapter 18. Installation from Source Code on <span class="productname">Windows</span></th></tr><tr><td width="10%" align="left"><a accesskey="p" href="installation-platform-notes.html" title="17.7. Platform-Specific Notes">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="admin.html" title="Part III. Server Administration">Up</a></td><th width="60%" align="center">Part III. Server Administration</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 15.4 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="install-windows-full.html" title="18.1. Building with Visual C++ or the Microsoft Windows SDK">Next</a></td></tr></table><hr /></div><div class="chapter" id="INSTALL-WINDOWS"><div class="titlepage"><div><div><h2 class="title">Chapter 18. Installation from Source Code on <span class="productname">Windows</span></h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="sect1"><a href="install-windows-full.html">18.1. Building with <span class="productname">Visual C++</span> or the
<span class="productname">Microsoft Windows SDK</span></a></span></dt><dd><dl><dt><span class="sect2"><a href="install-windows-full.html#id-1.6.5.8.8">18.1.1. Requirements</a></span></dt><dt><span class="sect2"><a href="install-windows-full.html#id-1.6.5.8.9">18.1.2. Special Considerations for 64-Bit Windows</a></span></dt><dt><span class="sect2"><a href="install-windows-full.html#id-1.6.5.8.10">18.1.3. Building</a></span></dt><dt><span class="sect2"><a href="install-windows-full.html#id-1.6.5.8.11">18.1.4. Cleaning and Installing</a></span></dt><dt><span class="sect2"><a href="install-windows-full.html#id-1.6.5.8.12">18.1.5. Running the Regression Tests</a></span></dt></dl></dd></dl></div><a id="id-1.6.5.2" class="indexterm"></a><p>
It is recommended that most users download the binary distribution for
Windows, available as a graphical installer package
from the <span class="productname">PostgreSQL</span> website at
<a class="ulink" href="https://www.postgresql.org/download/" target="_top">https://www.postgresql.org/download/</a>. Building from source
is only intended for people developing <span class="productname">PostgreSQL</span>
or extensions.
</p><p>
There are several different ways of building PostgreSQL on
<span class="productname">Windows</span>. The simplest way to build with
Microsoft tools is to install <span class="productname">Visual Studio 2022</span>
and use the included compiler. It is also possible to build with the full
<span class="productname">Microsoft Visual C++ 2013 to 2022</span>.
In some cases that requires the installation of the
<span class="productname">Windows SDK</span> in addition to the compiler.
</p><p>
It is also possible to build PostgreSQL using the GNU compiler tools
provided by <span class="productname">MinGW</span>, or using
<span class="productname">Cygwin</span> for older versions of
<span class="productname">Windows</span>.
</p><p>
Building using <span class="productname">MinGW</span> or
<span class="productname">Cygwin</span> uses the normal build system, see
<a class="xref" href="installation.html" title="Chapter 17. Installation from Source Code">Chapter 17</a> and the specific notes in
<a class="xref" href="installation-platform-notes.html#INSTALLATION-NOTES-MINGW" title="17.7.4. MinGW/Native Windows">Section 17.7.4</a> and <a class="xref" href="installation-platform-notes.html#INSTALLATION-NOTES-CYGWIN" title="17.7.2. Cygwin">Section 17.7.2</a>.
To produce native 64 bit binaries in these environments, use the tools from
<span class="productname">MinGW-w64</span>. These tools can also be used to
cross-compile for 32 bit and 64 bit <span class="productname">Windows</span>
targets on other hosts, such as <span class="productname">Linux</span> and
<span class="productname">macOS</span>.
<span class="productname">Cygwin</span> is not recommended for running a
production server, and it should only be used for running on
older versions of <span class="productname">Windows</span> where
the native build does not work. The official
binaries are built using <span class="productname">Visual Studio</span>.
</p><p>
Native builds of <span class="application">psql</span> don't support command
line editing. The <span class="productname">Cygwin</span> build does support
command line editing, so it should be used where psql is needed for
interactive use on <span class="productname">Windows</span>.
</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="installation-platform-notes.html" title="17.7. Platform-Specific Notes">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="admin.html" title="Part III. Server Administration">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="install-windows-full.html" title="18.1. Building with Visual C++ or the Microsoft Windows SDK">Next</a></td></tr><tr><td width="40%" align="left" valign="top">17.7. Platform-Specific Notes </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 15.4 Documentation">Home</a></td><td width="40%" align="right" valign="top"> 18.1. Building with <span class="productname">Visual C++</span> or the
<span class="productname">Microsoft Windows SDK</span></td></tr></table></div></body></html>
|