| От | Tom Lane |
|---|---|
| Тема | Re: ALTER TABLE ... DISABLE TRIGGERS Isolation leve |
| Дата | |
| Msg-id | 2296.1304964768@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | ALTER TABLE ... DISABLE TRIGGERS Isolation leve (CG <cgg007@yahoo.com>) |
| Список | pgsql-general |
CG <cgg007@yahoo.com> writes:
> I want to add a column to a table, but there are update triggers that will fire that don't need to fire for this
operation.So, I'd like to add the column with triggers off. Normally this operation would take 10 or so seconds, so
lockingthe table for that amount of time is not a big deal. I just want to make sure that no new data gets written to
thetable while the triggers are disabled.
Are you overthinking the problem? Adding a column without a default
doesn't do any row updates and shouldn't fire any triggers. I'm not
sure that adding a column *with* a default will fire update triggers
either. (That might be a bug, if so ...)
Suggest testing before assuming you have a problem to solve.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера