2 Chapter 5. Data Definition
12 5.5.1. Check Constraints
13 5.5.2. Not-Null Constraints
14 5.5.3. Unique Constraints
17 5.5.6. Exclusion Constraints
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
32 5.9. Row Security Policies
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
47 5.12. Table Partitioning
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
57 5.14. Other Database Objects
58 5.15. Dependency Tracking
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.