1 <!-- doc/src/sgml/postgres.sgml -->
3 <!DOCTYPE book PUBLIC
"-//OASIS//DTD DocBook XML V4.5//EN"
4 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
7 <!ENTITY % version SYSTEM
"version.sgml">
9 <!ENTITY % filelist SYSTEM
"filelist.sgml">
12 <!ENTITY reference SYSTEM
"reference.sgml">
15 Zero-width space. Use this to allow line breaks at desirable places in
16 table cells, examples, etc. without causing an unwanted space when the
17 break is not needed in a wider output rendering.
19 <!ENTITY zwsp
"​">
24 <title>PostgreSQL
&version; Documentation
</title>
27 <corpauthor>The PostgreSQL Global Development Group
</corpauthor>
28 <productname>PostgreSQL
</productname>
29 <productnumber>&version;</productnumber>
36 <title>Tutorial
</title>
40 Welcome to the
<productname>PostgreSQL
</productname> Tutorial. The
41 tutorial is intended to give an introduction
42 to
<productname>PostgreSQL
</productname>, relational database
43 concepts, and the SQL language. We assume some general knowledge about
44 how to use computers and no particular Unix or programming experience is
45 required. This tutorial is intended to provide hands-on experience with
46 important aspects of the
<productname>PostgreSQL
</productname> system.
47 It makes no attempt to be a comprehensive treatment of the topics it covers.
51 After you have successfully completed this tutorial you will want to
52 read the
<xref linkend=
"sql"/> section to gain a better understanding
53 of the SQL language, or
<xref linkend=
"client-interfaces"/> for
54 information about developing applications with
55 <productname>PostgreSQL
</productname>. Those who provision and
56 manage their own PostgreSQL installation should also read
<xref linkend=
"admin"/>.
67 <title>The SQL Language
</title>
71 This part describes the use of the
<acronym>SQL
</acronym> language
72 in
<productname>PostgreSQL
</productname>. We start with
73 describing the general syntax of
<acronym>SQL
</acronym>, then
74 how to create tables, how to populate the database, and how to
75 query it. The middle part lists the available data types and
76 functions for use in
<acronym>SQL
</acronym> commands. Lastly,
77 we address several aspects of importance for tuning a database.
81 The information is arranged so that a novice user can
82 follow it from start to end and gain a full understanding of the topics
83 without having to refer forward too many times. The chapters are
84 intended to be self-contained, so that advanced users can read the
85 chapters individually as they choose. The information is presented
86 in narrative form with topical units. Readers looking for a complete
87 description of a particular command are encouraged to review
88 the
<xref linkend=
"reference"/>.
92 Readers should know how to connect to a
93 <productname>PostgreSQL
</productname> database and issue
94 <acronym>SQL
</acronym> commands. Readers that are unfamiliar with
95 these issues are encouraged to read
<xref linkend=
"tutorial"/>
96 first.
<acronym>SQL
</acronym> commands are typically entered
97 using the
<productname>PostgreSQL
</productname> interactive terminal
98 <application>psql
</application>, but other programs that have
99 similar functionality can be used as well.
119 <title>Server Administration
</title>
123 This part covers topics that are of interest to a
124 <productname>PostgreSQL
</productname> administrator. This includes
125 installation, configuration of the server, management of users
126 and databases, and maintenance tasks. Anyone running
127 <productname>PostgreSQL
</productname> server, even for
128 personal use, but especially in production, should be familiar
133 The information attempts to be in the order in which
134 a new user should read it. The chapters are self-contained and
135 can be read individually as desired. The information is presented
136 in a narrative form in topical units. Readers looking for a complete
137 description of a command are encouraged to review the
138 <xref linkend=
"reference"/>.
142 The first few chapters are written so they can be understood
143 without prerequisite knowledge, so new users who need to set
144 up their own server can begin their exploration. The rest of this
145 part is about tuning and management; that material
146 assumes that the reader is familiar with the general use of
147 the
<productname>PostgreSQL
</productname> database system. Readers are
148 encouraged review the
<xref linkend=
"tutorial"/> and
<xref
149 linkend=
"sql"/> parts for additional information.
166 &logical-replication;
172 <part id=
"client-interfaces">
173 <title>Client Interfaces
</title>
177 This part describes the client programming interfaces distributed
178 with
<productname>PostgreSQL
</productname>. Each of these chapters can be
179 read independently. There are many external programming
180 interfaces for client programs that are distributed separately. They
181 contain their own documentation (
<xref linkend=
"external-projects"/>
182 lists some of the more popular ones). Readers of this part should be
183 familiar with using
<acronym>SQL
</acronym> to manipulate
184 and query the database (see
<xref linkend=
"sql"/>) and of course
185 with the programming language of their choice.
196 <part id=
"server-programming">
197 <title>Server Programming
</title>
201 This part is about extending the server functionality with
202 user-defined functions, data types, triggers, etc. These are
203 advanced topics which should be approached only after all
204 the other user documentation about
<productname>PostgreSQL
</productname> has
205 been understood. Later chapters in this part describe the server-side
206 programming languages available in the
207 <productname>PostgreSQL
</productname> distribution as well as
208 general issues concerning server-side programming. It
209 is essential to read at least the earlier sections of
<xref
210 linkend=
"extend"/> (covering functions) before diving into the
211 material about server-side programming.
229 &replication-origins;
236 <part id=
"internals">
237 <title>Internals
</title>
241 This part contains assorted information that might be of use to
242 <productname>PostgreSQL
</productname> developers.
269 <part id=
"appendixes">
270 <title>Appendixes
</title>
290 <index id=
"bookindex"></index>