pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: pgsql-committers@postgresql.org
Subject: pgsql: Add pg_sequences view
Date: Fri, 18 Nov 2016 19:59:24 +0000
Message-ID: <E1c7pJk-0002cC-Qp@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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@proxel.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(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1c7pJk-0002cC-Qp@gemulon.postgresql.org>
Permalink:  ../E1c7pJk-0002cC-Qp@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1c7pJk-0002cC-Qp@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: peter_e@gmx.net
  Subject: Re: pgsql: Add pg_sequences view
  In-Reply-To: <E1c7pJk-0002cC-Qp@gemulon.postgresql.org>
  References: <E1c7pJk-0002cC-Qp@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox