Next:
List of Figures
Up:
PostgreSQL: Introduction and Concepts
Previous:
Dedication
Contents
Dedication
Contents
List of Figures
List of Tables
Foreword
Preface
Acknowledgments
History of P
OSTGRE
SQL
Introduction
University of California at Berkeley
Development Leaves Berkeley
P
OSTGRE
SQL 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 I
NSERT
Viewing Data with S
ELECT
Selecting Specific Rows with W
HERE
Removing Data with D
ELETE
Modifying Data with U
PDATE
Sorting Data with O
RDER
B
Y
Destroying Tables
Summary
Customizing Queries
Data Types
Quotes Inside Text
Using N
ULL
Values
Controlling D
EFAULT
Values
Column Labels
Comments
A
ND/
O
R
Usage
Range of Values
L
IKE
Comparison
Regular Expressions
C
ASE
Clause
Distinct Rows
Functions and Operators
S
ET,
S
HOW,
and R
ESET
Summary
SQL Aggregates
Aggregates
Using G
ROUP
B
Y
Using H
AVING
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 (
OID
s)
Object Identification Number Limitations
Sequences
Creating Sequences
Using Sequences to Number Rows
Serial Column Type
Manually Numbering Rows
Summary
Combining S
ELECT
s
U
NION,
E
XCEPT,
and I
NTERSECT
Clauses
Subqueries
Outer Joins
Subqueries in Non-
SELECT
Queries
U
PDATE
with F
ROM
Inserting Data Using S
ELECT
Creating Tables Using S
ELECT
Summary
Data Types
Purpose of Data Types
Installed Types
Type Conversion Using C
AST
Support Functions
Support Operators
Support Variables
Arrays
Large Objects (
BLOB
s)
Summary
Transactions and Locks
Transactions
Multistatement Transactions
Visibility of Committed Transactions
Read Committed and Serializable Isolation Levels
Locking
Deadlocks
Summary
Performance
Indexes
Unique Indexes
C
LUSTER
V
ACUUM
V
ACUUM
A
NALYZE
E
XPLAIN
Summary
Controlling Results
L
IMIT
Cursors
Summary
Table Management
Temporary Tables
A
LTER
T
ABLE
G
RANT
and R
EVOKE
Inheritance
Views
Rules
L
ISTEN
and N
OTIFY
Summary
Constraints
N
OT
N
ULL
U
NIQUE
P
RIMARY
K
EY
Foreign Key/R
EFERENCES
C
HECK
Summary
Importing and Exporting Data
Using C
OPY
C
OPY
File Format
D
ELIMITERS
C
OPY
Without Files
Backslashes and N
ULL
Values
C
OPY
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
O
DBC
Java (
JDBC)
Scripting Languages
Perl
T
CL/
T
K (PGTCLSH/PGTKSH)
Python
P
HP
Installing Scripting Languages
Summary
Functions and Triggers
Functions
S
QL
Functions
P
L/PGSQL
Functions
Triggers
Summary
Extending P
OSTGRE
SQL 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 (
FAQ
s)
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
Bruce Momjian
2005-04-21