diff options
author | Bruce Momjian <bruce@momjian.us> | 1998-03-30 16:47:35 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1998-03-30 16:47:35 +0000 |
commit | 9a0dd4fb183958f59f68d8a5f096dd8df18d9b59 (patch) | |
tree | 2843356dbd25f4e11cf4a414e56d6afae3775071 /src/backend/commands | |
parent | c579ce0fb03aaf92d184adf369cf13be013adf1b (diff) | |
download | postgresql-9a0dd4fb183958f59f68d8a5f096dd8df18d9b59.tar.gz postgresql-9a0dd4fb183958f59f68d8a5f096dd8df18d9b59.zip |
There's a patch attached to fix gcc 2.8.x warnings, except for the
yyerror ones from bison. It also includes a few 'enhancements' to
the C programming style (which are, of course, personal).
The other patch removes the compilation of backend/lib/qsort.c, as
qsort() is a standard function in stdlib.h and can be used any
where else (and it is). It was only used in
backend/optimizer/geqo/geqo_pool.c, backend/optimizer/path/predmig.c,
and backend/storage/page/bufpage.c
> > Some or all of these changes might not be appropriate for v6.3,
since we > > are in beta testing and since they do not affect the
current functionality. > > For those cases, how about submitting
patches based on the final v6.3 > > release?
There's more to come. Please review these patches. I ran the
regression tests and they only failed where this was expected
(random, geo, etc).
Cheers,
Jeroen
Diffstat (limited to 'src/backend/commands')
-rw-r--r-- | src/backend/commands/copy.c | 4 | ||||
-rw-r--r-- | src/backend/commands/sequence.c | 6 | ||||
-rw-r--r-- | src/backend/commands/variable.c | 6 |
3 files changed, 13 insertions, 3 deletions
diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index bf8a974401e..b2ca946b80b 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -6,7 +6,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.44 1998/02/26 04:30:52 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.45 1998/03/30 16:45:55 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -1160,6 +1160,7 @@ CopyAttributeOut(FILE *fp, char *string, char *delim) (c == '\\' && !is_array)) fputc('\\', fp); else if (c == '\\' && is_array) + { if (*(string + 1) == '\\') { /* translate \\ to \\\\ */ @@ -1174,6 +1175,7 @@ CopyAttributeOut(FILE *fp, char *string, char *delim) fputc('\\', fp); fputc('\\', fp); } + } fputc(*string, fp); } } diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c index 9f3b27ba6d5..8313d15c651 100644 --- a/src/backend/commands/sequence.c +++ b/src/backend/commands/sequence.c @@ -499,18 +499,22 @@ init_params(CreateSeqStmt *seq, SequenceTupleForm new) elog(ERROR, "DefineSequence: can't INCREMENT by 0"); if (max_value == (DefElem *) NULL) /* MAXVALUE */ + { if (new->increment_by > 0) new->max_value = SEQ_MAXVALUE; /* ascending seq */ else new->max_value = -1;/* descending seq */ + } else new->max_value = get_param(max_value); if (min_value == (DefElem *) NULL) /* MINVALUE */ + { if (new->increment_by > 0) new->min_value = 1; /* ascending seq */ else new->min_value = SEQ_MINVALUE; /* descending seq */ + } else new->min_value = get_param(min_value); @@ -519,10 +523,12 @@ init_params(CreateSeqStmt *seq, SequenceTupleForm new) new->min_value, new->max_value); if (last_value == (DefElem *) NULL) /* START WITH */ + { if (new->increment_by > 0) new->last_value = new->min_value; /* ascending seq */ else new->last_value = new->max_value; /* descending seq */ + } else new->last_value = get_param(last_value); diff --git a/src/backend/commands/variable.c b/src/backend/commands/variable.c index 364eed343b7..621854f200f 100644 --- a/src/backend/commands/variable.c +++ b/src/backend/commands/variable.c @@ -2,7 +2,7 @@ * Routines for handling of 'SET var TO', * 'SHOW var' and 'RESET var' statements. * - * $Id: variable.c,v 1.4 1998/02/26 04:31:05 momjian Exp $ + * $Id: variable.c,v 1.5 1998/03/30 16:45:59 momjian Exp $ * */ @@ -444,13 +444,15 @@ parse_timezone(const char *value) { /* Not yet tried to save original value from environment? */ if (defaultTZ == NULL) + { /* found something? then save it for later */ if ((defaultTZ = getenv("TZ")) != NULL) strcpy(TZvalue, defaultTZ); - /* found nothing so mark with an invalid pointer */ + /* found nothing so mark with an invalid pointer */ else defaultTZ = (char *) -1; + } strcpy(tzbuf, "TZ="); strcat(tzbuf, tok); |