Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
4Activity
0 of .
Results for:
No results containing your search query
P. 1
Postgresql 8

Postgresql 8

Ratings: (0)|Views: 279|Likes:
Published by api-3831626
manual sobre o programa para basedados
manual sobre o programa para basedados

More info:

Published by: api-3831626 on Oct 18, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

03/18/2014

pdf

text

original

PostgreSQL 8.0.0 Documentation
The PostgreSQL Global Development Group
PostgreSQL 8.0.0 Documentation
by The PostgreSQL Global Development Group
Copyright \u00a9 1996-2005 by The PostgreSQL Global Development Group
Legal Notice
PostgreSQL is Copyright \u00a9 1996-2005 by the PostgreSQL Global Development Group and is distributed under the terms of the license of the
University of California below.
Postgres95 is Copyright \u00a9 1994-5 by the Regents of the University of California.

Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies.

IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PRO- VIDED HEREUNDER IS ON AN \u201cAS-IS\u201d BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

Table of Contents
Preface.................................................................................................................................................. i

1. What is PostgreSQL?............................................................................................................... i
2. A Brief History of PostgreSQL...............................................................................................ii
2.1. The Berkeley POSTGRES Project.............................................................................ii
2.2. Postgres95...................................................................................................................ii
2.3. PostgreSQL................................................................................................................iii
3. Conventions............................................................................................................................iii
4. Further Information................................................................................................................ iv
5. Bug Reporting Guidelines...................................................................................................... iv
5.1. Identifying Bugs........................................................................................................ iv
5.2. What to report............................................................................................................. v
5.3. Where to report bugs................................................................................................vii

I. Tutorial............................................................................................................................................. 1

1. Getting Started........................................................................................................................ 1
1.1. Installation.................................................................................................................. 1
1.2. Architectural Fundamentals........................................................................................ 1
1.3. Creating a Database.................................................................................................... 2
1.4. Accessing a Database................................................................................................. 3
2. The SQL Language................................................................................................................. 6
2.1. Introduction................................................................................................................ 6
2.2. Concepts..................................................................................................................... 6
2.3. Creating a New Table................................................................................................. 6
2.4. Populating a Table With Rows................................................................................... 7
2.5. Querying a Table........................................................................................................ 8
2.6. Joins Between Tables................................................................................................ 10
2.7. Aggregate Functions................................................................................................. 12
2.8. Updates..................................................................................................................... 13
2.9. Deletions................................................................................................................... 14
3. Advanced Features................................................................................................................ 15
3.1. Introduction.............................................................................................................. 15

3.2. Views........................................................................................................................ 15 3.3. Foreign Keys............................................................................................................. 15 3.4. Transactions.............................................................................................................. 16 3.5. Inheritance................................................................................................................ 18 3.6. Conclusion................................................................................................................ 19

II. The SQL Language...................................................................................................................... 21

4. SQL Syntax........................................................................................................................... 23
4.1. Lexical Structure....................................................................................................... 23
4.1.1. Identi\ufb01ers and Key Words............................................................................ 23
4.1.2. Constants...................................................................................................... 24
4.1.2.1. String Constants.............................................................................. 24
4.1.2.2. Dollar-Quoted String Constants...................................................... 25
4.1.2.3. Bit-String Constants........................................................................ 26
4.1.2.4. Numeric Constants.......................................................................... 26
4.1.2.5. Constants of Other Types................................................................ 27
4.1.3. Operators...................................................................................................... 27
4.1.4. Special Characters........................................................................................ 28
4.1.5. Comments.................................................................................................... 28

iii