Can not restore when there is a primary key violation

Поиск
Список
Период
Сортировка
Искать

Can not restore when there is a primary key violation

От:
Piyush Lenka <lenka.piyush@gmail.com>
Дата:
Hi,

 My table "Tbl1" contains primary keys (1,2,3,4,5,6,7,8,9 and 10),
I took a backup of "Tbl1" to backup file "Backup1.sql",
then deleted all records,
and added a column with primary key 5.
and tried to restore Backup file "Backup1.sql"
But it did not restore any columns....Is there any Option to restore all other columns except 5.
Please Help.


Thanks & Regards
Piyush Lenka

Re: Can not restore when there is a primary key violation

От:
Francisco Leovey <fleovey@yahoo.com>
Дата:
Delete all records
Restore from backup
Update record with key=5
(BTW you are talking about rows, not columns, right?)


From: Piyush Lenka <lenka.piyush@gmail.com>
To: pgsql-novice@postgresql.org
Sent: Thursday, March 1, 2012 11:02 AM
Subject: [NOVICE] Can not restore when there is a primary key violation

Hi,

 My table "Tbl1" contains primary keys (1,2,3,4,5,6,7,8,9 and 10),
I took a backup of "Tbl1" to backup file "Backup1.sql",
then deleted all records,
and added a column with primary key 5.
and tried to restore Backup file "Backup1.sql"
But it did not restore any columns....Is there any Option to restore all other columns except 5.
Please Help.


Thanks & Regards
Piyush Lenka


FAQ