Are there any plans to implement deferrable unique constraints?
I have two identical tables a1 and a2. Each of them has a primary key 'id' and unique constraint on 'prod' and 'code'.
Now, imagine the following situation:
a1:
id prod code
1 1 abc1
2 1 abc2
a2:
id prod code
1 1 abc2
2 1 abc1
Basically, a1 and a2 have code values swapped.
Now, I want to update 'code' values in table a1 with values from table a2 relying on equal 'id' values. This throws a 'can not insert duplicate value' exception.
Is there a way to deal with this situation? I would prefer not to update 'id' values based on 'prod' and 'code' values though.
Thanks.
Oleg
*************************************
This e-mail may contain privileged or confidential material intended for the named recipient only.
If you are not the named recipient, delete this message and all attachments.
Unauthorized reviewing, copying, printing, disclosing, or otherwise using information in this e-mail is prohibited.
We reserve the right to monitor e-mail sent through our network.
*************************************