diff options
| author | Tom Lane | 2002-05-22 21:40:55 +0000 |
|---|---|---|
| committer | Tom Lane | 2002-05-22 21:40:55 +0000 |
| commit | a2597ef17958e75e7ba26507dc407249cc9e7134 (patch) | |
| tree | b183395473fde3961ed029a4c82f384e2a392d4d /src/include/commands | |
| parent | b8ffc9960235afec9f0a81fc15665514241c2a75 (diff) | |
Modify sequence state storage to eliminate dangling-pointer problem
exemplified by bug #671. Moving the storage to relcache turned out to
be a bad idea because relcache might decide to discard the info. Instead,
open and close the relcache entry on each sequence operation, and use
a record of the current XID to discover whether we already hold
AccessShareLock on the sequence.
Diffstat (limited to 'src/include/commands')
| -rw-r--r-- | src/include/commands/defrem.h | 5 | ||||
| -rw-r--r-- | src/include/commands/sequence.h | 3 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/include/commands/defrem.h b/src/include/commands/defrem.h index cf9048c714b..5ebead414d1 100644 --- a/src/include/commands/defrem.h +++ b/src/include/commands/defrem.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: defrem.h,v 1.37 2002/05/17 18:32:52 petere Exp $ + * $Id: defrem.h,v 1.38 2002/05/22 21:40:55 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -54,12 +54,13 @@ extern void DefineDomain(CreateDomainStmt *stmt); extern void RemoveDomain(List *names, int behavior); -/* support routines in define.c */ +/* support routines in commands/define.c */ extern void case_translate_language_name(const char *input, char *output); extern char *defGetString(DefElem *def); extern double defGetNumeric(DefElem *def); +extern int64 defGetInt64(DefElem *def); extern List *defGetQualifiedName(DefElem *def); extern TypeName *defGetTypeName(DefElem *def); extern int defGetTypeLength(DefElem *def); diff --git a/src/include/commands/sequence.h b/src/include/commands/sequence.h index 48c0673cdf9..e91523ac47d 100644 --- a/src/include/commands/sequence.h +++ b/src/include/commands/sequence.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: sequence.h,v 1.19 2001/11/05 17:46:33 momjian Exp $ + * $Id: sequence.h,v 1.20 2002/05/22 21:40:55 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -84,7 +84,6 @@ extern Datum setval(PG_FUNCTION_ARGS); extern Datum setval_and_iscalled(PG_FUNCTION_ARGS); extern void DefineSequence(CreateSeqStmt *stmt); -extern void CloseSequences(void); extern void seq_redo(XLogRecPtr lsn, XLogRecord *rptr); extern void seq_undo(XLogRecPtr lsn, XLogRecord *rptr); |
