Temporarily disable not null constraints - Mailing list pgsql-performance

From Nagaraj Raj
Subject Temporarily disable not null constraints
Date
Msg-id 815507272.4135293.1607025495638@mail.yahoo.com
Whole thread Raw
Responses Re: Temporarily disable not null constraints  (Michael Lewis <mlewis@entrata.com>)
Re: Temporarily disable not null constraints  (Milos Babic <milos.babic@gmail.com>)
Re: Temporarily disable not null constraints  (Justin Pryzby <pryzby@telsasoft.com>)
List pgsql-performance
Hi,

Can we disable not null constraints temporarily in the session-based transaction, like we disable FK constraints? 

SET session_replication_role = ‘replica’; 
alter table table_name disable trigger user;”

above two options are working for unique constraints violation exception. 

Thanks,
Rj

pgsql-performance by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: time taking deletion on large tables
Next
From: Michael Lewis
Date:
Subject: Re: Temporarily disable not null constraints