my question is related to this question. I want to switch two id of a table which are defined as primary keys.
But unfortunately the table where I want to switch the ids was already created and the primary key constraint was not set do deferrable
.
I tried to set it to deferrable with the following statement:
alter table table_name alter constraint primary_key_name_pkey deferrable;
And got an error:
constraint "primary_key_name_pkey" of relation "table_name" is not a foreign key constraint
Is there any way to set a primary key constraint to deferrable after creation?
Thanks for your help.