| |
| |
List of Figures | |
| |
| |
List of Tables | |
| |
| |
Foreword | |
| |
| |
Preface | |
| |
| |
Acknowledgments | |
| |
| |
| |
History of PostgreSQL | |
| |
| |
| |
Introduction | |
| |
| |
| |
University of California at Berkeley | |
| |
| |
| |
Development Leaves Berkeley | |
| |
| |
| |
PostgreSQL Global Development Team | |
| |
| |
| |
Open Source Software | |
| |
| |
| |
Summary | |
| |
| |
| |
Issuing Database Commands | |
| |
| |
| |
Starting a Database Session | |
| |
| |
| |
Controlling a Session | |
| |
| |
| |
Getting Help | |
| |
| |
| |
Exiting a Session | |
| |
| |
| |
Summary | |
| |
| |
| |
Basic SQL Commands | |
| |
| |
| |
Relational Databases | |
| |
| |
| |
Creating Tables | |
| |
| |
| |
Adding Data with Insert | |
| |
| |
| |
Viewing Data with Select | |
| |
| |
| |
Selecting Specific Rows with Where | |
| |
| |
| |
Removing Data with Delete | |
| |
| |
| |
Modifying Data with Update | |
| |
| |
| |
Sorting Data with Order By | |
| |
| |
| |
Destroying Tables | |
| |
| |
| |
Summary | |
| |
| |
| |
Customizing Queries | |
| |
| |
| |
Data Types | |
| |
| |
| |
Quotes Inside Text | |
| |
| |
| |
Using Null Values | |
| |
| |
| |
Controlling Default Values | |
| |
| |
| |
Column Labels | |
| |
| |
| |
Comments | |
| |
| |
| |
And/Or Usage | |
| |
| |
| |
Range of Values | |
| |
| |
| |
Like Comparison | |
| |
| |
| |
Regular Expressions | |
| |
| |
| |
Case Clause | |
| |
| |
| |
Distinct Rows | |
| |
| |
| |
Functions and Operators | |
| |
| |
| |
Set, Show, and Reset | |
| |
| |
| |
Summary | |
| |
| |
| |
SQL Aggregates | |
| |
| |
| |
Aggregates | |
| |
| |
| |
Using Group By | |
| |
| |
| |
Using Having | |
| |
| |
| |
Query Tips | |
| |
| |
| |
Summary | |
| |
| |
| |
Joining Tables | |
| |
| |
| |
Table and Column References | |
| |
| |
| |
Joined Tables | |
| |
| |
| |
Creating Joined Tables | |
| |
| |
| |
Performing Joins | |
| |
| |
| |
Three- and Four-Table Joins | |
| |
| |
| |
Additional Join Possibilities | |
| |
| |
| |
Choosing a Join Key | |
| |
| |
| |
One-to-Many Joins | |
| |
| |
| |
Unjoined Tables | |
| |
| |
| |
Table Aliases and Self-joins | |
| |
| |
| |
Non-equijoins | |
| |
| |
| |
Ordering Multiple Parts | |
| |
| |
| |
Primary and Foreign Keys | |
| |
| |
| |
Summary | |
| |
| |
| |
Numbering Rows | |
| |
| |
| |
Object Identification Numbers (OIDs) | |
| |
| |
| |
Object Identification Number Limitations | |
| |
| |
| |
Sequences | |
| |
| |
| |
Creating Sequences | |
| |
| |
| |
Using Sequences to Number Rows | |
| |
| |
| |
Serial Column Type | |
| |
| |
| |
Manually Numbering Rows | |
| |
| |
| |
Summary | |
| |
| |
| |
Combining Selects | |
| |
| |
| |
Union, Except, and Intersect Clauses | |
| |
| |
| |
Subqueries | |
| |
| |
| |
Outer Joins | |
| |
| |
| |
Subqueries in Non-Select Queries | |
| |
| |
| |
Update with From | |
| |
| |
| |
Inserting Data Using Select | |
| |
| |
| |
Creating Tables Using Select | |
| |
| |
| |
Summary | |
| |
| |
| |
Data Types | |
| |
| |
| |
Purpose of Data Types | |
| |
| |
| |
Installed Types | |
| |
| |
| |
Type Conversion Using Cast | |
| |
| |
| |
Support Functions | |
| |
| |
| |
Support Operators | |
| |
| |
| |
Support Variables | |
| |
| |
| |
Arrays | |
| |
| |
| |
Large Objects (BLOBs) | |
| |
| |
| |
Summary | |
| |
| |
| |
Transactions and Locks | |
| |
| |
| |
Transactions | |
| |
| |
| |
Multistatement Transactions | |
| |
| |
| |
Visibility of Committed Transactions | |
| |
| |
| |
Read Committed and Serializable Isolation Levels | |
| |
| |
| |
Locking | |
| |
| |
| |
Deadlocks | |
| |
| |
| |
Summary | |
| |
| |
| |
Performance | |
| |
| |
| |
Indexes | |
| |
| |
| |
Unique Indexes | |
| |
| |
| |
Cluster | |
| |
| |
| |
Vacuum | |
| |
| |
| |
Vacuum Analyze | |
| |
| |
| |
Explain | |
| |
| |
| |
Summary | |
| |
| |
| |
Controlling Results | |
| |
| |
| |
Limit | |
| |
| |
| |
Cursors | |
| |
| |
| |
Summary | |
| |
| |
| |
Table Management | |
| |
| |
| |
Temporary Tables | |
| |
| |
| |
Alter Table | |
| |
| |
| |
Grant and Revoke | |
| |
| |
| |
Inheritance | |
| |
| |
| |
Views | |
| |
| |
| |
Rules | |
| |
| |
| |
Listen and Notify | |
| |
| |
| |
Summary | |
| |
| |
| |
Constraints | |
| |
| |
| |
Not Null | |
| |
| |
| |
Unique | |
| |
| |
| |
Primary Key | |
| |
| |
| |
Foreign Key/References | |
| |
| |
| |
Check | |
| |
| |
| |
Summary | |
| |
| |
| |
Importing and Exporting Data | |
| |
| |
| |
Using Copy | |
| |
| |
| |
Copy File Format | |
| |
| |
| |
Delimiters | |
| |
| |
| |
Copy Without Files | |
| |
| |
| |
Backslashes and Null Values | |
| |
| |
| |
Copy Tips | |
| |
| |
| |
Summary | |
| |
| |
| |
Database Query Tools | |
| |
| |
| |
Psql | |
| |
| |
| |
Pgaccess | |
| |
| |
| |
Summary | |
| |
| |
| |
Programming Interfaces | |
| |
| |
| |
C Language Interface (LIBPQ) | |
| |
| |
| |
Pgeasy (LIBPGEASY) | |
| |
| |
| |
Embedded C (ECPG) | |
| |
| |
| |
C + + (LIBPQ + +) | |
| |
| |
| |
Compiling Programs | |
| |
| |
| |
Assignment to Program Variables | |
| |
| |
| |
Odbc | |
| |
| |
| |
Java (JDBC) | |
| |
| |
| |
Scripting Languages | |
| |
| |
| |
Perl | |
| |
| |
| |
Tcl/Tk (PGTCLSH/PGTKSH) | |
| |
| |
| |
Python | |
| |
| |
| |
Php | |
| |
| |
| |
Installing Scripting Languages | |
| |
| |
| |
Summary | |
| |
| |
| |
Functions and Triggers | |
| |
| |
| |
Functions | |
| |
| |
| |
Sql Functions | |
| |
| |
| |
Pl/PGSQL Functions | |
| |
| |
| |
Triggers | |
| |
| |
| |
Summary | |
| |
| |
| |
Extending PostgreSQL Using C | |
| |
| |
| |
Write the C Code | |
| |
| |
| |
Compile the C Code | |
| |
| |
| |
Register the New Functions | |
| |
| |
| |
Create Operators, Types, and Aggregates | |
| |
| |
| |
Summary | |
| |
| |
| |
Administration | |
| |
| |
| |
Files | |
| |
| |
| |
Creating Users | |
| |
| |
| |
Creating Databases | |
| |
| |
| |
Access Configuration | |
| |
| |
| |
Backup and Restore | |
| |
| |
| |
Server Start-up and Shutdown | |
| |
| |
| |
Monitoring | |
| |
| |
| |
Performance | |
| |
| |
| |
System Tables | |
| |
| |
| |
Internationalization | |
| |
| |
| |
Upgrading | |
| |
| |
| |
Summary | |
| |
| |
| |
Additional Resources | |
| |
| |
| |
Mailing List Support | |
| |
| |
| |
Supplied Documentation | |
| |
| |
| |
Commercial Support | |
| |
| |
| |
Modifying the Source Code | |
| |
| |
| |
Frequently Asked Questions (FAQs) | |
| |
| |
| |
Installation | |
| |
| |
| |
PostgreSQL Nonstandard Features by Chapter | |
| |
| |
| |
Reference Manual | |
| |
| |
| |
Abort | |
| |
| |
| |
Alter Group | |
| |
| |
| |
Alter Table | |
| |
| |
| |
Alter User | |
| |
| |
| |
Begin | |
| |
| |
| |
Close | |
| |
| |
| |
Cluster | |
| |
| |
| |
Comment | |
| |
| |
| |
Commit | |
| |
| |
| |
Copy | |
| |
| |
| |
Create Aggregate | |
| |
| |
| |
Create Constraint Trigger | |
| |
| |
| |
Create Database | |
| |
| |
| |
Create Function | |
| |
| |
| |
Create Group | |
| |
| |
| |
Create Index | |
| |
| |
| |
Create Language | |
| |
| |
| |
Create Operator | |
| |
| |
| |
Create Rule | |
| |
| |
| |
Create Sequence | |
| |
| |
| |
Create Table | |
| |
| |
| |
Create Table As | |
| |
| |
| |
Create Trigger | |
| |
| |
| |
Create Type | |
| |
| |
| |
Create User | |
| |
| |
| |
Create View | |
| |
| |
| |
createdb | |
| |
| |
| |
createlang | |
| |
| |
| |
createuser | |
| |
| |
| |
Declare | |
| |
| |
| |
Delete | |
| |
| |
| |
Drop Aggregate | |
| |
| |
| |
Drop Database | |
| |
| |
| |
Drop Function | |
| |
| |
| |
Drop Group | |
| |
| |
| |
Drop Index | |
| |
| |
| |
Drop Language | |
| |
| |
| |
Drop Operator | |
| |
| |
| |
Drop Rule | |
| |
| |
| |
Drop Sequence | |
| |
| |
| |
Drop Table | |
| |
| |
| |
Drop Trigger | |
| |
| |
| |
Drop Type | |
| |
| |
| |
Drop User | |
| |
| |
| |
Drop View | |
| |
| |
| |
dropdb | |
| |
| |
| |
droplang | |
| |
| |
| |
dropuser | |
| |
| |
| |
ecpg | |
| |
| |
| |
End | |
| |
| |
| |
Explain | |
| |
| |
| |
Fetch | |
| |
| |
| |
Grant | |
| |
| |
| |
initdb | |
| |
| |
| |
initlocation | |
| |
| |
| |
Insert | |
| |
| |
| |
ipcclean | |
| |
| |
| |
Listen | |
| |
| |
| |
Load | |
| |
| |
| |
Lock | |
| |
| |
| |
Move | |
| |
| |
| |
Notify | |
| |
| |
| |
pg_ctl | |
| |
| |
| |
pg_dump | |
| |
| |
| |
pg_dumpall | |
| |
| |
| |
pg_passwd | |
| |
| |
| |
pg_upgrade | |
| |
| |
| |
pgaccess | |
| |
| |
| |
pgtclsh | |
| |
| |
| |
pgtksh | |
| |
| |
| |
postgres | |
| |
| |
| |
postmaster | |
| |
| |
| |
psql | |
| |
| |
| |
Reindex | |
| |
| |
| |
Reset | |
| |
| |
| |
Revoke | |
| |
| |
| |
Rollback | |
| |
| |
| |
Select | |
| |
| |
| |
Select Into | |
| |
| |
| |
Set | |
| |
| |
| |
Show | |
| |
| |
| |
Truncate | |
| |
| |
| |
Unlisten | |
| |
| |
| |
Update | |
| |
| |
| |
Vacuum | |
| |
| |
| |
vacuumdb | |
| |
| |
Bibliography | |
| |
| |
Index | |