Search Postgresql Archives

Re: Facing error while restoring the database

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux