Re: pg_dump oid problems - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_dump oid problems
Date
Msg-id 10339.1002816916@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_dump oid problems  (steve <steve@jlajla.com>)
List pgsql-hackers
steve <steve@jlajla.com> writes:
> DEBUG:  query: SELECT c.relname FROM pg_index i LEFT OUTER JOIN pg_class c
> ON c.oid = i.indexrelid WHERE i.indrelid = 3527162388AND   i.indisprimary
> ERROR:  dtoi4: integer out of range

> The 3527162388AND is exactly as shown in the log, with no space between the
> value and the AND, I guess this is the problem, wherever it's being
> generated in the code.

That's evidently coming from line 2346 of src/bin/pg_dump/pg_dump.c:
                             "WHERE i.indrelid = %s"

Try changing it to
                             "WHERE i.indrelid = '%s'::oid "

(Problem seems to be solved already in 7.2devel)
        regards, tom lane


pgsql-hackers by date:

Previous
From: steve
Date:
Subject: Re: pg_dump oid problems
Next
From: Rachit Siamwalla
Date:
Subject: Re: Deadlock? idle in transaction