Search Postgresql Archives

Re: ALTER TABLE ... DISABLE TRIGGERS Isolation leve

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



CG <cgg007@xxxxxxxxx> 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 locking the table for that amount of time is not a big deal. I just want to make sure that no new data gets written to the table 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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux