From 67dc4ccbb2e1c27da823eced66d9217a5652cbb0 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Fri, 18 Nov 2016 12:00:00 -0500 Subject: 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 --- src/include/commands/sequence.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/include/commands') diff --git a/src/include/commands/sequence.h b/src/include/commands/sequence.h index 392a6265082..6695bbe4c7a 100644 --- a/src/include/commands/sequence.h +++ b/src/include/commands/sequence.h @@ -73,6 +73,7 @@ extern Datum setval3_oid(PG_FUNCTION_ARGS); extern Datum lastval(PG_FUNCTION_ARGS); extern Datum pg_sequence_parameters(PG_FUNCTION_ARGS); +extern Datum pg_sequence_last_value(PG_FUNCTION_ARGS); extern ObjectAddress DefineSequence(ParseState *pstate, CreateSeqStmt *stmt); extern ObjectAddress AlterSequence(ParseState *pstate, AlterSeqStmt *stmt); -- cgit v1.2.3