pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedDisable Constraints in Postgresql 8.4
2+ messages / 2 participants
[nested] [flat]
* Disable Constraints in Postgresql 8.4
@ 2009-09-29 08:52 Jyoti Seth <jyotiseth2001@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: Jyoti Seth @ 2009-09-29 08:52 UTC (permalink / raw)
To: pgsql-sql
I want to execute a sql file for that I need to disable constraints.
In postgres version 8.3, I was executing the script by doing the
following:
1. Disabling triggers by updating “reltriggers” field of pg_class to 0 .
2. Executing sql file
3. Then updating “reltriggers” field of pg_class by “select count(*) from
pg_trigger where pg_trigger.tgrelid=pg_class.oid”
In postgres version 8.4, “pg_class” table does not have “reltriggers” field.
How can I disable and enable constraints in Postgres Version 8.4?
--
View this message in context: http://www.nabble.com/Disable-Constraints-in-Postgresql-8.4-tp25659252p25659252.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Disable Constraints in Postgresql 8.4
@ 2009-09-29 14:13 Tom Lane <tgl@sss.pgh.pa.us>
parent: Jyoti Seth <jyotiseth2001@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2009-09-29 14:13 UTC (permalink / raw)
To: Jyoti Seth <jyotiseth2001@gmail.com>; +Cc: pgsql-sql
Jyoti Seth <jyotiseth2001@gmail.com> writes:
> How can I disable and enable constraints in Postgres Version 8.4?
See ALTER TABLE DISABLE TRIGGER. (Fooling with reltriggers has been
deprecated since 8.1.)
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2009-09-29 14:13 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-09-29 08:52 Disable Constraints in Postgresql 8.4 Jyoti Seth <jyotiseth2001@gmail.com>
2009-09-29 14:13 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox