mirror of
https://github.com/postgres/postgres.git
synced 2025-10-24 01:29:19 +03:00
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.
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user