]> begriffs open source - ai-pg/blob - full-docs/txt/ddl.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / ddl.txt
1
2 Chapter 5. Data Definition
3
4    Table of Contents
5
6    5.1. Table Basics
7    5.2. Default Values
8    5.3. Identity Columns
9    5.4. Generated Columns
10    5.5. Constraints
11
12         5.5.1. Check Constraints
13         5.5.2. Not-Null Constraints
14         5.5.3. Unique Constraints
15         5.5.4. Primary Keys
16         5.5.5. Foreign Keys
17         5.5.6. Exclusion Constraints
18
19    5.6. System Columns
20    5.7. Modifying Tables
21
22         5.7.1. Adding a Column
23         5.7.2. Removing a Column
24         5.7.3. Adding a Constraint
25         5.7.4. Removing a Constraint
26         5.7.5. Changing a Column's Default Value
27         5.7.6. Changing a Column's Data Type
28         5.7.7. Renaming a Column
29         5.7.8. Renaming a Table
30
31    5.8. Privileges
32    5.9. Row Security Policies
33    5.10. Schemas
34
35         5.10.1. Creating a Schema
36         5.10.2. The Public Schema
37         5.10.3. The Schema Search Path
38         5.10.4. Schemas and Privileges
39         5.10.5. The System Catalog Schema
40         5.10.6. Usage Patterns
41         5.10.7. Portability
42
43    5.11. Inheritance
44
45         5.11.1. Caveats
46
47    5.12. Table Partitioning
48
49         5.12.1. Overview
50         5.12.2. Declarative Partitioning
51         5.12.3. Partitioning Using Inheritance
52         5.12.4. Partition Pruning
53         5.12.5. Partitioning and Constraint Exclusion
54         5.12.6. Best Practices for Declarative Partitioning
55
56    5.13. Foreign Data
57    5.14. Other Database Objects
58    5.15. Dependency Tracking
59
60    This chapter covers how one creates the database structures that will
61    hold one's data. In a relational database, the raw data is stored in
62    tables, so the majority of this chapter is devoted to explaining how
63    tables are created and modified and what features are available to
64    control what data is stored in the tables. Subsequently, we discuss how
65    tables can be organized into schemas, and how privileges can be
66    assigned to tables. Finally, we will briefly look at other features
67    that affect the data storage, such as inheritance, table partitioning,
68    views, functions, and triggers.