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.
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
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера