Re: BUG #13513: Turning a table into a view
От | Andres Freund |
---|---|
Тема | Re: BUG #13513: Turning a table into a view |
Дата | |
Msg-id | 20150722134418.GG19573@alap3.anarazel.de обсуждение исходный текст |
Ответ на | Re: BUG #13513: Turning a table into a view (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-bugs |
On 2015-07-22 09:42:15 -0400, Tom Lane wrote: > Andres Freund <andres@anarazel.de> writes: > > You can probably work around the problem by inserting a VACUUM > > tbl_becoming_view; before the CREATE RULE. IIRC that should "recompute" > > relhastriggers. > > Dunno, I think vacuum does update relhasindexes, but there would be no > reason for it to think about relhastriggers. I still didn't test, but there appears to be code for relhastriggers: void vac_update_relstats(Relation relation, BlockNumber num_pages, double num_tuples, BlockNumber num_all_visible_pages, bool hasindex, TransactionId frozenxid, MultiXactId minmulti, bool in_outer_xact) { ... if (pgcform->relhastriggers && relation->trigdesc == NULL) { pgcform->relhastriggers = false; dirty = true; } Andres
В списке pgsql-bugs по дате отправления: