Data Definition
note
This mirror of official PostgreSQL documentation is brought to you by Neon with β€οΈ.
Not all features and functions are supported. See Postgres compatibility for details.
Not all features and functions are supported. See Postgres compatibility for details.
Chapter 5. Data Definition
Table of Contents
This chapter covers how one creates the database structures that will hold one's data. In a relational database, the raw data is stored in tables, so the majority of this chapter is devoted to explaining how tables are created and modified and what features are available to control what data is stored in the tables. Subsequently, we discuss how tables can be organized into schemas, and how privileges can be assigned to tables. Finally, we will briefly look at other features that affect the data storage, such as inheritance, table partitioning, views, functions, and triggers.