aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-05-19 23:00:00 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-05-19 23:00:00 +0000
commit8b5b3e0011b0ba5855ff3f2072a7652ecbf5480d (patch)
treed40f5fc6f6bb8b207ac0597e367237aed0f07fd5
parent4763cddaf56bc96e0971e1d6b44505040332a920 (diff)
downloadpostgresql-8b5b3e0011b0ba5855ff3f2072a7652ecbf5480d.tar.gz
postgresql-8b5b3e0011b0ba5855ff3f2072a7652ecbf5480d.zip
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?
-rw-r--r--src/bin/pg_dump/common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/pg_dump/common.c b/src/bin/pg_dump/common.c
index 458f871e7ab..bd37ef2a5f5 100644
--- a/src/bin/pg_dump/common.c
+++ b/src/bin/pg_dump/common.c
@@ -8,7 +8,7 @@
*
*
* 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
*
@@ -190,7 +190,7 @@ parseNumericArray(const char *str, char **array, int arraysize)
}
else
{
- if (!isdigit(s) || j >= sizeof(temp) - 1)
+ if (!(isdigit(s) || s == '-') || j >= sizeof(temp) - 1)
{
fprintf(stderr, "parseNumericArray: bogus number\n");
exit(2);