Re: New Event Trigger: table_rewrite
От | Dimitri Fontaine |
---|---|
Тема | Re: New Event Trigger: table_rewrite |
Дата | |
Msg-id | m2y4r6gfh4.fsf@2ndQuadrant.fr обсуждение исходный текст |
Ответ на | Re: New Event Trigger: table_rewrite (Alvaro Herrera <alvherre@2ndquadrant.com>) |
Ответы |
Re: New Event Trigger: table_rewrite
|
Список | pgsql-hackers |
Alvaro Herrera <alvherre@2ndquadrant.com> writes: >> CLUSTER and VACUUM are not part of the supported commands anymore, so >> I think that we could replace that by the addition of a reference >> number in the cell of ALTER TABLE for the event table_rewrite and >> write at the bottom of the table a description of how this event >> behaves with ALTER TABLE. Note as well that "might or might not" is >> not really helpful for the user. > > That's precisely why we have an event trigger here, I think --- for some > subcommands, it's not easy to determine whether a rewrite happens or > not. (I think SET TYPE is the one). I don't think we want to document > precisely under what condition a rewrite takes place. Yeah, the current documentation expands to the following sentence, as browsed in http://www.postgresql.org/docs/9.3/interactive/sql-altertable.html As an exception, if the USING clause does not change the column contents and the old type is either binary coercible to the new type or an unconstrained domain over the new type, a table rewrite is not needed, but any indexes on the affected columns must still be rebuilt. I don't think that “might or might not” is less helpful in the context of the Event Trigger, because the whole point is that the event is only triggered in case of a rewrite. Of course we could cross link the two paragraphs or something. >> 2) The examples of SQL queries provided are still in lower case in the >> docs, that's contrary to the rest of the docs where upper case is used >> for reserved keywords. Right, being consistent trumps personal preferences, changed in the attached. > Yes please. <nitpick> Another thing in that sample code is "not current_hour > between 1 and 6". That reads strange to me. It should be equally > correct to spell it as "current_hour not between 1 and 6", which seems > more natural. </> True, fixed in the attached. Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support
Вложения
В списке pgsql-hackers по дате отправления: