<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: PostgreSQL: How to Disable or Enable Foreign Key Constraint of a Table	</title>
	<atom:link href="https://www.dbrnd.com/2017/02/postgresql-how-to-disable-or-enable-foreign-key-constraint-of-a-table-data-migration-bulk-operation/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com/2017/02/postgresql-how-to-disable-or-enable-foreign-key-constraint-of-a-table-data-migration-bulk-operation/</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Fri, 01 May 2020 14:42:21 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.4</generator>
	<item>
		<title>
		By: Alexandre Paiva		</title>
		<link>https://www.dbrnd.com/2017/02/postgresql-how-to-disable-or-enable-foreign-key-constraint-of-a-table-data-migration-bulk-operation/#comment-8262</link>

		<dc:creator><![CDATA[Alexandre Paiva]]></dc:creator>
		<pubDate>Fri, 01 May 2020 14:42:21 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3939#comment-8262</guid>

					<description><![CDATA[Congratulations Patel, I´m a developer of system computer. I&#039;m migrating from Oracle to PostgreSql, but I have to keep systems running two databases. Very good article, congratulations. I&#039;ll be around more often. Thank you.]]></description>
			<content:encoded><![CDATA[<p>Congratulations Patel, I´m a developer of system computer. I&#8217;m migrating from Oracle to PostgreSql, but I have to keep systems running two databases. Very good article, congratulations. I&#8217;ll be around more often. Thank you.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Tiago van den Berg		</title>
		<link>https://www.dbrnd.com/2017/02/postgresql-how-to-disable-or-enable-foreign-key-constraint-of-a-table-data-migration-bulk-operation/#comment-7754</link>

		<dc:creator><![CDATA[Tiago van den Berg]]></dc:creator>
		<pubDate>Thu, 12 Sep 2019 16:03:56 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3939#comment-7754</guid>

					<description><![CDATA[Great  Post. Disabling triggers speed up batch processings.

For simple UPDATE cases where it is necessary, POSTGRES allows deferrable foreign keys. That means that a foreign key will be validated only after commiting transaction. So it is possible to modifiy all records that share a constrained key inside a transaction.

Its possible to change a FOREIGN KEY with the following command:

ALTER TABLE Table_Name ALTER CONSTRAINT Constraint_Name_Fk DEFERRABLE INITIALLY DEFERRED;]]></description>
			<content:encoded><![CDATA[<p>Great  Post. Disabling triggers speed up batch processings.</p>
<p>For simple UPDATE cases where it is necessary, POSTGRES allows deferrable foreign keys. That means that a foreign key will be validated only after commiting transaction. So it is possible to modifiy all records that share a constrained key inside a transaction.</p>
<p>Its possible to change a FOREIGN KEY with the following command:</p>
<p>ALTER TABLE Table_Name ALTER CONSTRAINT Constraint_Name_Fk DEFERRABLE INITIALLY DEFERRED;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: CV Kannan		</title>
		<link>https://www.dbrnd.com/2017/02/postgresql-how-to-disable-or-enable-foreign-key-constraint-of-a-table-data-migration-bulk-operation/#comment-7328</link>

		<dc:creator><![CDATA[CV Kannan]]></dc:creator>
		<pubDate>Wed, 12 Jun 2019 17:33:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3939#comment-7328</guid>

					<description><![CDATA[Thanks for the post. I tried to disable constraints on a table with the syntax provided &#038; getting some errors :- 

alter table AUTOMIC.RT disable TRIGGER ALL;
ERROR:  syntax error at or near &quot;alter&quot;
LINE 2:  alter table AUTOMIC.RT disable TRIGGER ALL;

ALTER TABLE AUTOMIC.RT DISABLE TRIGGER ALL;
ERROR:  permission denied: &quot;RI_ConstraintTrigger_c_17366&quot; is a system trigger]]></description>
			<content:encoded><![CDATA[<p>Thanks for the post. I tried to disable constraints on a table with the syntax provided &amp; getting some errors :- </p>
<p>alter table AUTOMIC.RT disable TRIGGER ALL;<br />
ERROR:  syntax error at or near &#8220;alter&#8221;<br />
LINE 2:  alter table AUTOMIC.RT disable TRIGGER ALL;</p>
<p>ALTER TABLE AUTOMIC.RT DISABLE TRIGGER ALL;<br />
ERROR:  permission denied: &#8220;RI_ConstraintTrigger_c_17366&#8221; is a system trigger</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Abhishek		</title>
		<link>https://www.dbrnd.com/2017/02/postgresql-how-to-disable-or-enable-foreign-key-constraint-of-a-table-data-migration-bulk-operation/#comment-6947</link>

		<dc:creator><![CDATA[Abhishek]]></dc:creator>
		<pubDate>Fri, 05 Apr 2019 04:22:03 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3939#comment-6947</guid>

					<description><![CDATA[I need the same action to be performed in the heroku. But heroku doesnot give the superuser access to us. But disabling the triggers requires the superuser access to psql. Is there any way that I can bypass the superuser access and perform the disable trigger. Or is there any other way than disabling the trigger to copy the records?]]></description>
			<content:encoded><![CDATA[<p>I need the same action to be performed in the heroku. But heroku doesnot give the superuser access to us. But disabling the triggers requires the superuser access to psql. Is there any way that I can bypass the superuser access and perform the disable trigger. Or is there any other way than disabling the trigger to copy the records?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Anvesh Patel		</title>
		<link>https://www.dbrnd.com/2017/02/postgresql-how-to-disable-or-enable-foreign-key-constraint-of-a-table-data-migration-bulk-operation/#comment-6909</link>

		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Fri, 08 Mar 2019 10:00:44 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3939#comment-6909</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.dbrnd.com/2017/02/postgresql-how-to-disable-or-enable-foreign-key-constraint-of-a-table-data-migration-bulk-operation/#comment-6894&quot;&gt;Szymon&lt;/a&gt;.

yes]]></description>
			<content:encoded><![CDATA[<p>yes</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Szymon		</title>
		<link>https://www.dbrnd.com/2017/02/postgresql-how-to-disable-or-enable-foreign-key-constraint-of-a-table-data-migration-bulk-operation/#comment-6894</link>

		<dc:creator><![CDATA[Szymon]]></dc:creator>
		<pubDate>Wed, 20 Feb 2019 14:27:42 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3939#comment-6894</guid>

					<description><![CDATA[Postgres - can I DISABLE TRIGGER where I&#039;m not relation owner?]]></description>
			<content:encoded><![CDATA[<p>Postgres &#8211; can I DISABLE TRIGGER where I&#8217;m not relation owner?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: David Climent		</title>
		<link>https://www.dbrnd.com/2017/02/postgresql-how-to-disable-or-enable-foreign-key-constraint-of-a-table-data-migration-bulk-operation/#comment-6864</link>

		<dc:creator><![CDATA[David Climent]]></dc:creator>
		<pubDate>Fri, 25 Jan 2019 17:23:24 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3939#comment-6864</guid>

					<description><![CDATA[Thanks a lot, you were so helpful!!]]></description>
			<content:encoded><![CDATA[<p>Thanks a lot, you were so helpful!!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ravikumar		</title>
		<link>https://www.dbrnd.com/2017/02/postgresql-how-to-disable-or-enable-foreign-key-constraint-of-a-table-data-migration-bulk-operation/#comment-6752</link>

		<dc:creator><![CDATA[Ravikumar]]></dc:creator>
		<pubDate>Wed, 10 Oct 2018 12:45:56 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3939#comment-6752</guid>

					<description><![CDATA[Dear Anvesh Patel,
I disable the triggers(constraint) and inserted the some data and again enable the trigger (constraint) then ???]]></description>
			<content:encoded><![CDATA[<p>Dear Anvesh Patel,<br />
I disable the triggers(constraint) and inserted the some data and again enable the trigger (constraint) then ???</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Mściwój		</title>
		<link>https://www.dbrnd.com/2017/02/postgresql-how-to-disable-or-enable-foreign-key-constraint-of-a-table-data-migration-bulk-operation/#comment-6693</link>

		<dc:creator><![CDATA[Mściwój]]></dc:creator>
		<pubDate>Thu, 13 Sep 2018 07:35:59 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3939#comment-6693</guid>

					<description><![CDATA[drawbacks/missing bits
- DISABLE TRIGGER ALL requires ADMIN/SU account
- it speeds up inserts etc… but ultimately can lead to data inconsistency (exactly the example you put). Should cover the topic/best practice of validating it manually as enabling triggers don&#039;t revalidate existing data.]]></description>
			<content:encoded><![CDATA[<p>drawbacks/missing bits<br />
&#8211; DISABLE TRIGGER ALL requires ADMIN/SU account<br />
&#8211; it speeds up inserts etc… but ultimately can lead to data inconsistency (exactly the example you put). Should cover the topic/best practice of validating it manually as enabling triggers don&#8217;t revalidate existing data.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Anvesh Patel		</title>
		<link>https://www.dbrnd.com/2017/02/postgresql-how-to-disable-or-enable-foreign-key-constraint-of-a-table-data-migration-bulk-operation/#comment-6180</link>

		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sat, 03 Feb 2018 06:50:46 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3939#comment-6180</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.dbrnd.com/2017/02/postgresql-how-to-disable-or-enable-foreign-key-constraint-of-a-table-data-migration-bulk-operation/#comment-6179&quot;&gt;:)&lt;/a&gt;.

Your welcome!]]></description>
			<content:encoded><![CDATA[<p>Your welcome!</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
