Re: Facing error while restoring the database

Поиск
Список
Период
Сортировка
От Alan Hodgson
Тема Re: Facing error while restoring the database
Дата
Msg-id 1456867.7feJTIYbIQ@skynet.simkin.ca
обсуждение исходный текст
Ответ на Re: Facing error while restoring the database  (Akshay Joshi <akshay.joshi@enterprisedb.com>)
Список pgsql-general
On Tuesday, March 27, 2012 08:20:23 PM Akshay Joshi wrote:
>   In my case I won't allow anyone to insert/modify the rows of sample_one
> table. I have already inserted some rows in sample_one table where I
>   want one constraint is number of array elements of sample_one.param_names
> and sample.params must be same. That's why I have created
>   CHECK constraint in sample table. User can insert, modify and delete the
> rows of sample table, so I don't want any mismatch in the number of
>   array elements of sample_one.param_names and sample.params table.
>

Well you have a couple of options.

1) Redesign to use a trigger instead of a check constraint.

2) During restore, you can use a custom table of contents extracted from the
dump, remove the constraint from that, do your restore, and then create the
constraint manually afterwards. This requires that you use the custom dump
format and pg_restore, of course.


В списке pgsql-general по дате отправления:

Предыдущее
От: Akshay Joshi
Дата:
Сообщение: Re: Facing error while restoring the database
Следующее
От: Eduardo Morras
Дата:
Сообщение: Re: Backing up through a database connection (not pg_dump)