PostgreSQL 11 Administration Cookbook
by Simon Riggs, Gianni Ciolli, Sudheer Kumar Meesala, Sheldon Strauch
How it works…
Each time you create a table, a composite type is automatically created with the same attribute names, types, and positions. Each ALTER TABLE command that changes table column definitions will silently issue a corresponding ALTER TYPE statement to keep the type in agreement with its table definition.
Enumerative values in PostgreSQL are stored in tables as numbers, which are transparently mapped to strings via the pg_enum catalog table. In order to allow inserting a new value between two existing ones, enumerative values are indexed by real numbers, which allow decimal points and have the same size in bytes as integer numbers. The motive is to use the numeric ordering to encode the order of values that was specified by the user. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access