Commit 8b5b3e00 authored by Tom Lane's avatar Tom Lane

pg_dump barfs on negative values for index column numbers --- like, say,

an index on a table's OID column.  Mea maxima culpa ... but how'd we get
through beta with no one noticing this?
parent 4763cdda
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.41 2000/04/12 17:16:14 momjian Exp $ * $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.42 2000/05/19 23:00:00 tgl Exp $
* *
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2 * Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
* *
...@@ -190,7 +190,7 @@ parseNumericArray(const char *str, char **array, int arraysize) ...@@ -190,7 +190,7 @@ parseNumericArray(const char *str, char **array, int arraysize)
} }
else else
{ {
if (!isdigit(s) || j >= sizeof(temp) - 1) if (!(isdigit(s) || s == '-') || j >= sizeof(temp) - 1)
{ {
fprintf(stderr, "parseNumericArray: bogus number\n"); fprintf(stderr, "parseNumericArray: bogus number\n");
exit(2); exit(2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment