From a6b2b0e82ee05c0d055ff58e633f93b822e0f87a Mon Sep 17 00:00:00 2001 From: Masahiko Sawada Date: Tue, 11 Apr 2017 23:43:11 +0900 Subject: [PATCH] Fix a mistake of merging. Also fix regression test failure. --- lib/pg_repack.sql.in | 2 ++ regress/expected/repack.out | 1 + regress/expected/repack_1.out | 1 + 3 files changed, 4 insertions(+) diff --git a/lib/pg_repack.sql.in b/lib/pg_repack.sql.in index 33c9868..862ed84 100644 --- a/lib/pg_repack.sql.in +++ b/lib/pg_repack.sql.in @@ -184,6 +184,8 @@ FROM ( WHERE oid = $1 ) as t +$$ +LANGUAGE sql STABLE STRICT; -- GET a SQL text to set column storage option for the table. CREATE FUNCTION repack.get_alter_col_storage(oid) diff --git a/regress/expected/repack.out b/regress/expected/repack.out index ebecc9a..dd4541d 100644 --- a/regress/expected/repack.out +++ b/regress/expected/repack.out @@ -314,6 +314,7 @@ ORDER BY 1; tbl_with_toast | {autovacuum_vacuum_scale_factor=30,autovacuum_vacuum_threshold=300} toast_table | {autovacuum_vacuum_scale_factor=40,autovacuum_vacuum_threshold=400} (2 rows) + SELECT pg_relation_size(reltoastrelid) = 0 as check_toast_rel_size FROM pg_class WHERE relname = 'tbl_with_mod_column_storage'; check_toast_rel_size ---------------------- diff --git a/regress/expected/repack_1.out b/regress/expected/repack_1.out index 3c2f62e..a7bbe2f 100644 --- a/regress/expected/repack_1.out +++ b/regress/expected/repack_1.out @@ -314,6 +314,7 @@ ORDER BY 1; tbl_with_toast | {autovacuum_vacuum_scale_factor=30,autovacuum_vacuum_threshold=300} toast_table | {autovacuum_vacuum_scale_factor=40,autovacuum_vacuum_threshold=400} (2 rows) + SELECT pg_relation_size(reltoastrelid) = 0 as check_toast_rel_size FROM pg_class WHERE relname = 'tbl_with_mod_column_storage'; check_toast_rel_size ----------------------