From 657c098e41b0bb29d30d13d9aa1ac858a07f3493 Mon Sep 17 00:00:00 2001 From: Neil Conway Date: Tue, 7 Jun 2005 07:08:35 +0000 Subject: Add a function lastval(), which returns the value returned by the last nextval() or setval() performed by the current session. Update the docs, add regression tests, and bump the catalog version. Patch from Dennis Björklund, various improvements by Neil Conway. --- src/include/commands/sequence.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/include/commands') diff --git a/src/include/commands/sequence.h b/src/include/commands/sequence.h index 48017538869..38538236c7a 100644 --- a/src/include/commands/sequence.h +++ b/src/include/commands/sequence.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/commands/sequence.h,v 1.31 2005/06/06 17:01:25 tgl Exp $ + * $PostgreSQL: pgsql/src/include/commands/sequence.h,v 1.32 2005/06/07 07:08:35 neilc Exp $ * *------------------------------------------------------------------------- */ @@ -82,6 +82,7 @@ typedef struct xl_seq_rec extern Datum nextval(PG_FUNCTION_ARGS); extern Datum currval(PG_FUNCTION_ARGS); +extern Datum lastval(PG_FUNCTION_ARGS); extern Datum setval(PG_FUNCTION_ARGS); extern Datum setval_and_iscalled(PG_FUNCTION_ARGS); -- cgit v1.2.3