-- Tests for relation options
CREATE EXTENSION dummy_index_am;
CREATE TABLE dummy_test_tab (i int4);
+-- Silence validation checks for strings
+SET client_min_messages TO 'warning';
-- Test with default values.
CREATE INDEX dummy_test_idx ON dummy_test_tab
USING dummy_index_am (i);
DROP INDEX dummy_test_idx;
-- Test with full set of options.
+-- Allow validation checks for strings, just for the index creation
+SET client_min_messages TO 'notice';
CREATE INDEX dummy_test_idx ON dummy_test_tab
USING dummy_index_am (i) WITH (
option_bool = false,
option_string_null = 'val');
NOTICE: new option value for string parameter null
NOTICE: new option value for string parameter val
+-- Silence again validation checks for strings until the end of the test.
+SET client_min_messages TO 'warning';
SELECT unnest(reloptions) FROM pg_class WHERE relname = 'dummy_test_idx';
unnest
------------------------
option_string_null=val
(5 rows)
--- Silence validation checks for strings
-SET client_min_messages TO 'warning';
-- ALTER INDEX .. SET
ALTER INDEX dummy_test_idx SET (option_int = 10);
ALTER INDEX dummy_test_idx SET (option_bool = true);
CREATE TABLE dummy_test_tab (i int4);
+-- Silence validation checks for strings
+SET client_min_messages TO 'warning';
+
-- Test with default values.
CREATE INDEX dummy_test_idx ON dummy_test_tab
USING dummy_index_am (i);
DROP INDEX dummy_test_idx;
-- Test with full set of options.
+-- Allow validation checks for strings, just for the index creation
+SET client_min_messages TO 'notice';
CREATE INDEX dummy_test_idx ON dummy_test_tab
USING dummy_index_am (i) WITH (
option_bool = false,
option_real = 3.1,
option_string_val = NULL,
option_string_null = 'val');
-SELECT unnest(reloptions) FROM pg_class WHERE relname = 'dummy_test_idx';
-
--- Silence validation checks for strings
+-- Silence again validation checks for strings until the end of the test.
SET client_min_messages TO 'warning';
+SELECT unnest(reloptions) FROM pg_class WHERE relname = 'dummy_test_idx';
-- ALTER INDEX .. SET
ALTER INDEX dummy_test_idx SET (option_int = 10);