From 1753b1b027035029c2a2a1649065762fafbf63f3 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 20 Dec 2016 12:00:00 -0500 Subject: Add pg_sequence system catalog Move sequence metadata (start, increment, etc.) into a proper system catalog instead of storing it in the sequence heap object. This separates the metadata from the sequence data. Sequence metadata is now operated on transactionally by DDL commands, whereas previously rollbacks of sequence-related DDL commands would be ignored. Reviewed-by: Andreas Karlsson --- doc/src/sgml/catalogs.sgml | 88 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 87 insertions(+), 1 deletion(-) (limited to 'doc/src') diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index 11c20191068..7a7bbde390b 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -260,6 +260,11 @@ security labels on database objects + + pg_sequence + information about sequences + + pg_shdepend dependencies on shared objects @@ -1546,7 +1551,8 @@ The catalog pg_class catalogs tables and most everything else that has columns or is otherwise similar to a table. This includes indexes (but see also - pg_index), sequences, views, materialized + pg_index), sequences (but see also + pg_sequence), views, materialized views, composite types, and TOAST tables; see relkind. Below, when we mean all of these kinds of objects we speak of relations. Not all @@ -5587,6 +5593,86 @@ + + <structname>pg_sequence</structname> + + + pg_sequence + + + + The catalog pg_sequence contains information about + sequences. Some of the information about sequences, such as the name and + the schema, is in pg_class. + + + + <structname>pg_sequence</> Columns + + + + + Name + Type + References + Description + + + + + + seqrelid + oid + pg_class.oid + The OID of the pg_class entry for this sequence + + + + seqstart + int8 + + Start value of the sequence + + + + seqincrement + int8 + + Increment value of the sequence + + + + seqmax + int8 + + Maximum value of the sequence + + + + seqmin + int8 + + Minimum value of the sequence + + + + seqcache + int8 + + Cache size of the sequence + + + + seqcycle + bool + + Whether the sequence cycles + + + +
+
+ <structname>pg_shdepend</structname> -- cgit v1.2.3