From: Teodor Sigaev Date: Thu, 31 Oct 2024 09:47:29 +0000 (+0300) Subject: Imrote test to cover previous commit. Daniil Davidov X-Git-Url: http://sigaev.ru/git/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;p=online_analyze.git Imrote test to cover previous commit. Daniil Davidov --- diff --git a/expected/online_analyze.out b/expected/online_analyze.out index a75e90b..065f6af 100644 --- a/expected/online_analyze.out +++ b/expected/online_analyze.out @@ -77,4 +77,25 @@ SELECT stavalues1 FROM pg_statistic WHERE starelid = 'copy_tbl'::regclass; {a,b} (2 rows) +SET online_analyze.table_type = "temporary"; +SET online_analyze.min_interval = "10000"; +SET online_analyze.scale_factor = "0.1"; +SET online_analyze.threshold = "50"; +-- Nothing bad should happen in COPY (query) TO file statement +COPY ( + SELECT 0 AS result +) TO STDOUT WITH DELIMITER ';' CSV; +0 +-- Nothing bad should happen in COPY relation TO file statement (copy_tbl does +-- not change anyway) +COPY copy_tbl TO stdout; +1 a +2 b +SELECT stavalues1 FROM pg_statistic WHERE starelid = 'copy_tbl'::regclass; + stavalues1 +------------ + {1,2} + {a,b} +(2 rows) + SET online_analyze.enable = off; diff --git a/sql/online_analyze.sql b/sql/online_analyze.sql index c3028e5..6bc6efe 100644 --- a/sql/online_analyze.sql +++ b/sql/online_analyze.sql @@ -38,4 +38,19 @@ SELECT * FROM copy_tbl; SELECT stavalues1 FROM pg_statistic WHERE starelid = 'insert_tbl'::regclass; SELECT stavalues1 FROM pg_statistic WHERE starelid = 'copy_tbl'::regclass; +SET online_analyze.table_type = "temporary"; +SET online_analyze.min_interval = "10000"; +SET online_analyze.scale_factor = "0.1"; +SET online_analyze.threshold = "50"; + +-- Nothing bad should happen in COPY (query) TO file statement +COPY ( + SELECT 0 AS result +) TO STDOUT WITH DELIMITER ';' CSV; + +-- Nothing bad should happen in COPY relation TO file statement (copy_tbl does +-- not change anyway) +COPY copy_tbl TO stdout; +SELECT stavalues1 FROM pg_statistic WHERE starelid = 'copy_tbl'::regclass; + SET online_analyze.enable = off;