> -----Original Message----- > From: pgsql-hackers-ow...@postgresql.org [mailto:pgsql-hackers- > ow...@postgresql.org] On Behalf Of Andres Freund > Sent: 06 December 2012 20:44 > To: Petr Jelinek > Cc: 'Simon Riggs'; 'Robert Haas'; 'Dimitri Fontaine'; 'Josh Berkus'; pgsql- > hack...@postgresql.org > Subject: Re: [HACKERS] ALTER TABLE ... NOREWRITE option > > > Event triggers get called *during* the ALTER TABLE. So if were not > > > careful they see something thats not easy to handle. > > > > > > > I thought the point of this was to call the trigger *before* anything > > happens. > > Just because the rewrite hasn't started yet, doesn't mean nothing else has > been changed. > > Note, I am not saying this is impossible or anything, the original point drawn > into question was that we need to be especially careful with choosing > callsites and thats its not trivial to do right. >
Ok my assumption is that the event would be fired before ALTER actually did anything, firing triggers while DDL is actually already being executed seems like bad idea. Regards Petr Jelinek -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers