2008-12-12

postgres pg_dump Error getTables(): SELECT (for PRIMARY KEY) failed on table okcashbag. Explanation from backend: ERROR: dtoi4: integer out of range

postgresql-7.1.3 : pg_dump.c
==>
diff pg_dump.c pg_dump_patch.c


2292c2292
< "SELECT Oid FROM pg_index i WHERE i.indisprimary AND i.indrelid = %s ",
---
> "SELECT Oid FROM pg_index i WHERE i.indisprimary AND i.indrelid = '%s'::oid ",
2331c2331
< " WHERE i.indrelid = %s"
---
> " WHERE i.indrelid = '%s'::oid"
2337c2337
< " WHERE i.indrelid = %s"
---
> " WHERE i.indrelid = '%s'::oid"
2346c2346
< "WHERE i.indrelid = %s"
---
> "WHERE i.indrelid = '%s'::oid "
3036,3037c3036,3038
< appendPQExpBuffer(query, "SELECT description FROM pg_description WHERE objoid = ");
< appendPQExpBuffer(query, oid);
---
> //appendPQExpBuffer(query, "SELECT description FROM pg_description WHERE objoid = ");
> //appendPQExpBuffer(query, oid);
> appendPQExpBuffer(query, "SELECT description FROM pg_description WHERE objoid = '%s'::oid", oid);

0 Comments:

Post a Comment

<< Home