summaryrefslogtreecommitdiff
path: root/src/test
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/test
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/test')
-rw-r--r--src/test/regress/regress.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/regress/regress.c b/src/test/regress/regress.c
index 18fb2d19962..c2ffb81ba2c 100644
--- a/src/test/regress/regress.c
+++ b/src/test/regress/regress.c
@@ -1,5 +1,5 @@
/*
- * $Header: /cvsroot/pgsql/src/test/regress/regress.c,v 1.38 2000/06/05 07:29:22 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/test/regress/regress.c,v 1.39 2000/06/11 20:07:44 tgl Exp $
*/
#include <float.h> /* faked on sunos */
@@ -8,6 +8,7 @@
#include "utils/geo_decls.h" /* includes <math.h> */
#include "executor/executor.h" /* For GetAttributeByName */
+#include "commands/sequence.h" /* for nextval() */
#define P_MAXDIG 12
#define LDELIM '('
@@ -420,8 +421,6 @@ funny_dup17(PG_FUNCTION_ARGS)
extern Datum ttdummy(PG_FUNCTION_ARGS);
int32 set_ttdummy(int32 on);
-extern int4 nextval(struct varlena * seqin);
-
#define TTDUMMY_INFINITY 999999
static void *splan = NULL;
@@ -528,9 +527,10 @@ ttdummy(PG_FUNCTION_ARGS)
}
{
- struct varlena *seqname = textin("ttdummy_seq");
+ text *seqname = textin("ttdummy_seq");
- newoff = nextval(seqname);
+ newoff = DirectFunctionCall1(nextval,
+ PointerGetDatum(seqname));
pfree(seqname);
}