Preface |
|
ix | |
|
|
1 | (8) |
|
|
1 | (1) |
|
|
1 | (1) |
|
|
2 | (1) |
|
What's New in Latest Versions of PostgreSQL? |
|
|
3 | (2) |
|
|
4 | (1) |
|
What to Look for in PostgreSQL 9.2 |
|
|
4 | (1) |
|
PostgreSQL 9.1 Improvements |
|
|
5 | (1) |
|
|
5 | (1) |
|
Server and Database Objects |
|
|
6 | (2) |
|
|
8 | (1) |
|
2 Database Administration |
|
|
9 | (22) |
|
|
9 | (5) |
|
|
10 | (2) |
|
|
12 | (2) |
|
Reload the Configuration Files |
|
|
14 | (1) |
|
Setting Up Groups and Login Roles (Users) |
|
|
14 | (2) |
|
Creating an Account That Can Log In |
|
|
15 | (1) |
|
|
15 | (1) |
|
|
16 | (1) |
|
|
16 | (2) |
|
Creating and Using a Template Database |
|
|
16 | (1) |
|
Organizing Your Database Using Schemas |
|
|
17 | (1) |
|
|
17 | (1) |
|
|
18 | (5) |
|
|
20 | (1) |
|
|
21 | (2) |
|
|
23 | (2) |
|
Selective Backup Using pg_dump |
|
|
23 | (1) |
|
Systemwide Backup Using pg_dumpall |
|
|
24 | (1) |
|
|
25 | (3) |
|
|
25 | (1) |
|
Using psql to Restore Plain Text SQL backups |
|
|
26 | (1) |
|
|
26 | (2) |
|
Managing Disk Space with Tablespaces |
|
|
28 | (1) |
|
|
28 | (1) |
|
Moving Objects Between Tablespaces |
|
|
28 | (1) |
|
|
28 | (3) |
|
Delete PostgreSQL Core System Files and Binaries |
|
|
29 | (1) |
|
Giving Full Administrative Rights to the Postgres System (Daemon) Account |
|
|
29 | (1) |
|
Setting shared_buffers Too High |
|
|
30 | (1) |
|
Trying to Start PostgreSQL on a Port Already in Use |
|
|
30 | (1) |
|
|
31 | (12) |
|
|
31 | (1) |
|
|
32 | (1) |
|
|
33 | (4) |
|
|
35 | (1) |
|
|
35 | (1) |
|
|
35 | (1) |
|
|
36 | (1) |
|
Retrieving Prior Commands |
|
|
36 | (1) |
|
|
37 | (1) |
|
|
37 | (1) |
|
|
37 | (1) |
|
Importing and Exporting Data |
|
|
38 | (1) |
|
|
39 | (4) |
|
|
43 | (16) |
|
|
43 | (2) |
|
|
43 | (1) |
|
Connecting to a PostgreSQL server |
|
|
44 | (1) |
|
|
44 | (1) |
|
|
45 | (6) |
|
Accessing psql from pgAdmin |
|
|
46 | (1) |
|
Editing postgresql.conf and pg_hba.conf from pgAdmin |
|
|
47 | (1) |
|
Creating Databases and Setting Permissions |
|
|
47 | (1) |
|
|
48 | (3) |
|
|
51 | (3) |
|
|
54 | (1) |
|
Job Scheduling with pgAgent |
|
|
55 | (4) |
|
|
56 | (1) |
|
|
56 | (1) |
|
|
57 | (2) |
|
|
59 | (14) |
|
|
59 | (1) |
|
|
59 | (1) |
|
|
60 | (1) |
|
|
60 | (2) |
|
|
61 | (1) |
|
Referencing Elements in An Array |
|
|
61 | (1) |
|
Array Slicing and Splicing |
|
|
62 | (1) |
|
|
62 | (3) |
|
|
63 | (1) |
|
Splitting Strings into Arrays, Tables, or Substrings |
|
|
63 | (1) |
|
Regular Expressions and Pattern Matching |
|
|
64 | (1) |
|
|
65 | (5) |
|
Time Zones: What It Is and What It Isn't |
|
|
66 | (2) |
|
Operators and Functions for Date and Time Data Types |
|
|
68 | (2) |
|
|
70 | (1) |
|
|
70 | (1) |
|
|
71 | (1) |
|
Custom and Composite Data Types |
|
|
71 | (2) |
|
|
71 | (1) |
|
Building Your Own Custom Type |
|
|
72 | (1) |
|
6 Of Tables, Constraints, and Indexes |
|
|
73 | (12) |
|
|
73 | (4) |
|
|
73 | (2) |
|
|
75 | (1) |
|
|
75 | (2) |
|
|
77 | (2) |
|
|
77 | (1) |
|
|
78 | (1) |
|
|
78 | (1) |
|
|
79 | (1) |
|
|
79 | (6) |
|
|
79 | (2) |
|
|
81 | (1) |
|
|
82 | (1) |
|
|
82 | (1) |
|
|
83 | (2) |
|
7 SQL: The PostgreSQL Way |
|
|
85 | (14) |
|
|
85 | (2) |
|
|
87 | (3) |
|
|
88 | (1) |
|
|
89 | (1) |
|
|
90 | (3) |
|
|
91 | (1) |
|
|
92 | (1) |
|
|
92 | (1) |
|
Constructions Unique to PostgreSQL |
|
|
93 | (6) |
|
|
93 | (1) |
|
|
94 | (1) |
|
|
94 | (1) |
|
ILIKE for Case Insensitive Search |
|
|
94 | (1) |
|
Set Returning Functions in SELECT |
|
|
95 | (1) |
|
Selective DELETE, UPDATE, and SELECT from Inherited Tables |
|
|
95 | (1) |
|
Returning Changed Records |
|
|
96 | (1) |
|
Composite Types in Queries |
|
|
96 | (3) |
|
|
99 | (12) |
|
Anatomy of PostgreSQL Functions |
|
|
99 | (2) |
|
|
99 | (1) |
|
Trusted and Untrusted Languages |
|
|
100 | (1) |
|
Writing Functions with SQL |
|
|
101 | (2) |
|
Writing PL/pgSQL Functions |
|
|
103 | (1) |
|
Writing PL/Python Functions |
|
|
103 | (2) |
|
|
104 | (1) |
|
|
105 | (2) |
|
|
107 | (4) |
|
9 Query Performance Tuning |
|
|
111 | (12) |
|
Explain and Explain Analyze |
|
|
111 | (2) |
|
|
113 | (5) |
|
Overusing Subqueries in SELECT |
|
|
114 | (2) |
|
|
116 | (1) |
|
|
116 | (2) |
|
Guiding the Query Planner |
|
|
118 | (3) |
|
|
118 | (1) |
|
How Useful Is Your Index? |
|
|
118 | (2) |
|
|
120 | (1) |
|
Random Page Cost and Quality of Drives |
|
|
120 | (1) |
|
|
121 | (2) |
|
10 Replication and External Data |
|
|
123 | (8) |
|
|
123 | (2) |
|
|
123 | (1) |
|
PostgreSQL Built-in Replication Advancements |
|
|
124 | (1) |
|
Third-Party Replication Options |
|
|
125 | (1) |
|
|
125 | (3) |
|
|
125 | (1) |
|
|
126 | (1) |
|
Initiate the Replication Process |
|
|
127 | (1) |
|
Foreign Data Wrappers (FDW) |
|
|
128 | (3) |
|
Querying Simple Flat File Data Sources |
|
|
128 | (1) |
|
Querying More Complex Data Sources |
|
|
129 | (2) |
Appendix: Install, Hosting, and Command-Line Guides |
|
131 | |