Re: Installed OK - now SQL error [message #40167 is a reply to message #32634] |
Fri, 18 January 2008 10:06 ![Go to previous message Go to previous message](/forum/theme/default/images/up.png) |
bsmanyan
![India India](/forum/images/flags/in.png) Messages: 1 Registered: January 2008
Karma:
|
Junior Member |
|
|
Postgres 8.1.4 default comes with OID off
I had similar problem while restoring data from 7.1.3 to 8.1.4 , i did the following and it worked
1. Take schema or structure dump < chk man pg_dump >
2. Edit the schema , in create table statements append it with "WITH OIDS" like given below
default would be like this - CREATE TABLE table_name ( );
edit it like this - CREATE TABLE table_name ( ) WITH OIDS;
For all the tables in the structure.
3. Restore the structure first
4. Disable the triggers in the that DB < I used a Java code which i asked developer for this purpose >
5. Take a Dump of the original DB ONLY THE DATA < refer man pg_dump >
6. Enable the triggers now < Again i used a java code given by my developer >
Hope it works for all......
Cheers,
Bala
|
|
|