pg_dump crashes trying to dump database containing index on oid - Mailing list pgsql-bugs

From Adam Haberlach
Subject pg_dump crashes trying to dump database containing index on oid
Date
Msg-id 20000522222957.A24174@ricochet.net
Whole thread Raw
Responses Re: pg_dump crashes trying to dump database containing index on oid  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Reply-To:

==========================================================================
POSTGRESQL BUG REPORT TEMPLATE
==========================================================================

Your name               : Adam Haberlach
Your email address      : adam@be.com


System Configuration
---------------------
  Architecture (example: Intel Pentium)         : Intel Pentium II

  Operating System (example: Linux 2.0.26 ELF)  : Linux version 2.2.2
(adam@bugnow) (gcc version 2.7.2.3) #1 Sat Mar 6 02:31:09 PST 1999

  PostgreSQL version (example: PostgreSQL-6.5.1):  PostgreSQL 7.0.0 on
i686-pc-linux-gnu, compiled by gcc 2.7.2.3

  Compiler used (example:  gcc 2.8.0)           :


Please enter a FULL description of your problem:
------------------------------------------------

pg_dump crashes trying to dump database containing index on oid



Please describe a way to repeat the problem.   Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------


createdb snafu
psql -d snafu
CREATE TABLE test (test text);
CREATE INDEX idx_test_oid ON test (oid);
\q
pg_dump snafu

This sequence crashes while gathering index information with:
parseNumericArray: bogus number

This occurs because the 'indkey' field in the query used by pg_dump
contains a '-2', which crashes its Numeric Array parser.

If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------

I believed the simplest fix would be to update the parser to handle the
negative numbers--cursory examination shows that it shouldn't be too
hard.  On the other hand, there may be problems with creating indexes
on oids.  This database worked just fine with Postgres 6.4.3


--
Adam Haberlach             |"You have to understand that the
adam@newsnipple.com        |  entire 'Net is based on people with
http://www.newsnipple.com/ |  too much free time on their hands."

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: port v7.0 to SGI-IRIX-6.5.7/64
Next
From: Adam Haberlach
Date:
Subject: ODBC SELECT WHERE a IN ('frob') returns where a = '' too