From 3477957b44baf2b53f95207ff8824a0361301a2e Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 11 Jun 2000 20:08:01 +0000 Subject: Update sequence-related functions to new fmgr style. Remove downcasing, quote-stripping, and acl-checking tasks for these functions from the parser, and do them at function execution time instead. This fixes the failure of pg_dump to produce correct output for nextval(Foo) used in a rule, and also eliminates the restriction that the argument of these functions must be a parse-time constant. --- src/include/commands/sequence.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/include/commands') diff --git a/src/include/commands/sequence.h b/src/include/commands/sequence.h index f602a6cb39..d695caa2df 100644 --- a/src/include/commands/sequence.h +++ b/src/include/commands/sequence.h @@ -9,10 +9,11 @@ #ifndef SEQUENCE_H #define SEQUENCE_H +#include "fmgr.h" #include "nodes/parsenodes.h" /* - * Columns of a sequnece relation + * Columns of a sequence relation */ #define SEQ_COL_NAME 1 @@ -27,10 +28,11 @@ #define SEQ_COL_FIRSTCOL SEQ_COL_NAME #define SEQ_COL_LASTCOL SEQ_COL_CALLED +extern Datum nextval(PG_FUNCTION_ARGS); +extern Datum currval(PG_FUNCTION_ARGS); +extern Datum setval(PG_FUNCTION_ARGS); + extern void DefineSequence(CreateSeqStmt *stmt); -extern int4 nextval(struct varlena * seqname); -extern int4 currval(struct varlena * seqname); -extern int4 setval(struct varlena * seqname, int4 next); extern void CloseSequences(void); #endif /* SEQUENCE_H */ -- cgit v1.2.1