Get rid of any toast table when converting a table to a view. Also make sure other fields of the view's pg_class entry are appropriate for a view; it shouldn't have relfrozenxid set for instance.
This ancient omission isn't believed to have any serious consequences in versions 8.4-9.2, so no backpatch. But let's fix it before it does bite us in some serious way. It's just luck that the case doesn't cause problems for autovacuum. (It did cause problems in 8.3, but that's out of support.) Andres Freund Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/b15a6da29217b14f02895af1d9271e84415a91ae Modified Files -------------- src/backend/rewrite/rewriteDefine.c | 98 ++++++++++++++++++++++++++++++---- src/backend/rewrite/rewriteSupport.c | 11 +--- src/include/rewrite/rewriteSupport.h | 3 +- src/test/regress/expected/rules.out | 7 +++ src/test/regress/sql/rules.sql | 3 + 5 files changed, 101 insertions(+), 21 deletions(-) -- Sent via pgsql-committers mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
