Lists: | pgsql-committers |
---|
From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Add pg_sequences view |
Date: | 2016-11-18 19:59:24 |
Message-ID: | E1c7pJk-0002cC-Qp@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers |
Add pg_sequences view
Like pg_tables, pg_views, and others, this view contains information
about sequences in a way that is independent of the system catalog
layout but more comprehensive than the information schema.
To help implement the view, add a new internal function
pg_sequence_last_value() to return the last value of a sequence. This
is kept separate from pg_sequence_parameters() to separate querying
run-time state from catalog-like information.
Reviewed-by: Andreas Karlsson <andreas(at)proxel(dot)se>
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/67dc4ccbb2e1c27da823eced66d9217a5652cbb0
Modified Files
--------------
doc/src/sgml/catalogs.sgml | 97 ++++++++++++++++++++++++++++++++
src/backend/catalog/system_views.sql | 17 ++++++
src/backend/commands/sequence.c | 49 +++++++++++++++-
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.h | 4 +-
src/include/commands/sequence.h | 1 +
src/test/regress/expected/rules.out | 14 +++++
src/test/regress/expected/sequence.out | 23 +++++++-
src/test/regress/expected/sequence_1.out | 23 +++++++-
src/test/regress/sql/sequence.sql | 13 ++++-
10 files changed, 233 insertions(+), 10 deletions(-)