Temporarily disable not null constraints

From: Nagaraj Raj <nagaraj(dot)sf(at)yahoo(dot)com>
To: Pgsql Performance <pgsql-performance(at)lists(dot)postgresql(dot)org>
Subject: Temporarily disable not null constraints
Date: 2020-12-03 19:58:15
Message-ID: 815507272.4135293.1607025495638@mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi,
Can we disable not null constraints temporarily in the session-based transaction, like we disable FK constraints? 
SETsession_replication_role = ‘replica’; alter table table_name disable trigger user;”

above two options are working for unique constraints violation exception. 
Thanks,Rj

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Michael Lewis 2020-12-03 20:09:51 Re: Temporarily disable not null constraints
Previous Message Rui DeSousa 2020-12-03 18:45:33 Re: time taking deletion on large tables