Re: Facing error while restoring the database - Mailing list pgsql-general

From Alan Hodgson
Subject Re: Facing error while restoring the database
Date
Msg-id 1456867.7feJTIYbIQ@skynet.simkin.ca
Whole thread Raw
In response to Re: Facing error while restoring the database  (Akshay Joshi <akshay.joshi@enterprisedb.com>)
List 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 by date:

Previous
From: Akshay Joshi
Date:
Subject: Re: Facing error while restoring the database
Next
From: Eduardo Morras
Date:
Subject: Re: Backing up through a database connection (not pg_dump)