Add a function lastval(), which returns the value returned by the
Neil Conway <neilc@samurai.com>
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.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/func.sgml | modified | +26 −1 |
| src/backend/commands/sequence.c | modified | +83 −31 |
| src/include/catalog/catversion.h | modified | +2 −2 |
| src/include/catalog/pg_proc.h | modified | +3 −1 |
| src/include/commands/sequence.h | modified | +2 −1 |
| src/test/regress/expected/sequence.out | modified | +59 −0 |
| src/test/regress/sql/sequence.sql | modified | +27 −0 |