PostgreSQL User's Guide

The PostgreSQL Development Team

Edited by

Thomas Lockhart

PostgreSQL is copyright (C) 1998 by the Postgres Global Development Group.


Table of Contents
Summary
1. Introduction
What is Postgres?
A Short History of Postgres
The Berkeley Postgres Project
Postgres95
PostgreSQL
About This Release
Resources
Terminology
Notation
Y2K Statement
Copyrights and Trademarks
2. Setting Up Your Environment
3. Managing a Database
Database Creation
Alternate Database Locations
Accessing a Database
Database Privileges
Table Privileges
Destroying a Database
4. SQL Syntax
Key Words
Reserved Key Words
Non-reserved Keywords
5. Data Types
Numeric Types
Monetary Type
Character Types
Date/Time Types
Date/Time Styles
Time Zones
Date/Time Input
datetime
timespan
abstime
reltime
timestamp
interval
tinterval
Boolean Type
Geometric Types
Point
Line Segment
Box
Path
Polygon
Circle
IP Version 4 Networks and Host Addresses
inet for IP Networks
inet for IP Networks
6. Operators
Lexical Precedence
General Operators
Numerical Operators
Geometric Operators
Time Interval Operators
IP V4 Operators
IP V4 Operators
7. Functions
Mathematical Functions
String Functions
Date/Time Functions
Geometric Functions
IP V4 Functions
8. Type Conversion
Overview
Guidelines
Operators
Conversion Procedure
Examples
Functions
Examples
Query Targets
Examples
UNION Queries
Examples
9. Indices and Keys
10. Arrays
11. Inheritance
12. The Query Language
Concepts
Creating a New Class
Populating a Class with Instances
Querying a Class
Redirecting SELECT Queries
Joins Between Classes
Updates
Deletions
Using Aggregate Functions
13. Disk Storage
14. psql
Paging To Screen
15. pgaccess
16. SQL Commands
ABORT
ALTER TABLE
ALTER USER
BEGIN WORK
CLOSE
CLUSTER
COMMIT
COPY
CREATE AGGREGATE
CREATE DATABASE
CREATE FUNCTION
CREATE INDEX
CREATE LANGUAGE
CREATE OPERATOR
CREATE RULE
CREATE SEQUENCE
CREATE TABLE
CREATE TABLE AS
CREATE TRIGGER
CREATE TYPE
CREATE USER
CREATE VIEW
DECLARE
DELETE
DROP AGGREGATE
DROP DATABASE
DROP FUNCTION
DROP INDEX
DROP LANGUAGE
DROP OPERATOR
DROP RULE
DROP SEQUENCE
DROP TABLE
DROP TRIGGER
DROP TYPE
DROP USER
DROP VIEW
EXPLAIN
FETCH
GRANT
INSERT
LISTEN
LOAD
LOCK
MOVE
NOTIFY
RESET
REVOKE
ROLLBACK
SELECT
SELECT INTO
SET
SHOW
UNLISTEN
UPDATE
VACUUM
17. Utility Applications
createdb
createuser
destroydb
destroyuser
initdb
initlocation
pg_dump
pg_dumpall
psql
SQL References