summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane2000-06-11 20:08:01 +0000
committerTom Lane2000-06-11 20:08:01 +0000
commit3477957b44baf2b53f95207ff8824a0361301a2e (patch)
treed3b15fe37f59cc4423a59a734d65dd48615fb265 /src/include
parente9acba1aded0caf2f7e02e8f1bbb813207d8cc8d (diff)
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.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/catalog/pg_proc.h10
-rw-r--r--src/include/commands/sequence.h10
2 files changed, 11 insertions, 9 deletions
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index 99b164c44c..e870737bf2 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_proc.h,v 1.137 2000/06/09 01:11:10 tgl Exp $
+ * $Id: pg_proc.h,v 1.138 2000/06/11 20:07:51 tgl Exp $
*
* NOTES
* The script catalog/genbki.sh reads this file and generates .bki
@@ -2003,12 +2003,12 @@ DESCR("convert int8 to int8 (no-op)");
/* SEQUENCEs nextval & currval functions */
-DATA(insert OID = 1574 ( nextval PGUID 11 f t f t 1 f 23 "25" 100 0 0 100 nextval - ));
+DATA(insert OID = 1574 ( nextval PGUID 12 f t f t 1 f 23 "25" 100 0 0 100 nextval - ));
DESCR("sequence next value");
-DATA(insert OID = 1575 ( currval PGUID 11 f t f t 1 f 23 "25" 100 0 0 100 currval - ));
+DATA(insert OID = 1575 ( currval PGUID 12 f t f t 1 f 23 "25" 100 0 0 100 currval - ));
DESCR("sequence current value");
-DATA(insert OID = 1576 ( setval PGUID 11 f t f t 2 f 23 "25 23" 100 0 0 100 setval - ));
-DESCR("sequence set value");
+DATA(insert OID = 1576 ( setval PGUID 12 f t f t 2 f 23 "25 23" 100 0 0 100 setval - ));
+DESCR("set sequence value");
DATA(insert OID = 1579 ( varbit_in PGUID 11 f t t t 1 f 1562 "0" 100 0 0 100 varbit_in - ));
DESCR("(internal)");
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 */