Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite0afac1

Browse files
committed
Make more stable regression tests of dummy_index_am for string validations
Several buildfarm members (crake, loach and spurfowl) are complainingabout two queries looking up at pg_class.reloptions which trigger thevalidation routines for string reloptions with default values. Thiscommit limits the routines to be triggered only when building an indexwith all custom options set in CREATE INDEX, which is sufficient for thecoverage.Introduced by640c198.
1 parent640c198 commite0afac1

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

‎src/test/modules/dummy_index_am/expected/reloptions.out

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
-- Tests for relation options
22
CREATE EXTENSION dummy_index_am;
33
CREATE TABLE dummy_test_tab (i int4);
4+
-- Silence validation checks for strings
5+
SET client_min_messages TO 'warning';
46
-- Test with default values.
57
CREATE INDEX dummy_test_idx ON dummy_test_tab
68
USING dummy_index_am (i);
@@ -11,6 +13,8 @@ SELECT unnest(reloptions) FROM pg_class WHERE relname = 'dummy_test_idx';
1113

1214
DROP INDEX dummy_test_idx;
1315
-- Test with full set of options.
16+
-- Allow validation checks for strings, just for the index creation
17+
SET client_min_messages TO 'notice';
1418
CREATE INDEX dummy_test_idx ON dummy_test_tab
1519
USING dummy_index_am (i) WITH (
1620
option_bool = false,
@@ -20,6 +24,8 @@ CREATE INDEX dummy_test_idx ON dummy_test_tab
2024
option_string_null = 'val');
2125
NOTICE: new option value for string parameter null
2226
NOTICE: new option value for string parameter val
27+
-- Silence again validation checks for strings until the end of the test.
28+
SET client_min_messages TO 'warning';
2329
SELECT unnest(reloptions) FROM pg_class WHERE relname = 'dummy_test_idx';
2430
unnest
2531
------------------------
@@ -30,8 +36,6 @@ SELECT unnest(reloptions) FROM pg_class WHERE relname = 'dummy_test_idx';
3036
option_string_null=val
3137
(5 rows)
3238

33-
-- Silence validation checks for strings
34-
SET client_min_messages TO 'warning';
3539
-- ALTER INDEX .. SET
3640
ALTER INDEX dummy_test_idx SET (option_int = 10);
3741
ALTER INDEX dummy_test_idx SET (option_bool = true);

‎src/test/modules/dummy_index_am/sql/reloptions.sql

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,28 @@ CREATE EXTENSION dummy_index_am;
33

44
CREATETABLEdummy_test_tab (i int4);
55

6+
-- Silence validation checks for strings
7+
SET client_min_messages TO'warning';
8+
69
-- Test with default values.
710
CREATEINDEXdummy_test_idxON dummy_test_tab
811
USING dummy_index_am (i);
912
SELECT unnest(reloptions)FROM pg_classWHERE relname='dummy_test_idx';
1013
DROPINDEX dummy_test_idx;
1114

1215
-- Test with full set of options.
16+
-- Allow validation checks for strings, just for the index creation
17+
SET client_min_messages TO'notice';
1318
CREATEINDEXdummy_test_idxON dummy_test_tab
1419
USING dummy_index_am (i) WITH (
1520
option_bool= false,
1621
option_int=5,
1722
option_real=3.1,
1823
option_string_val=NULL,
1924
option_string_null='val');
20-
SELECT unnest(reloptions)FROM pg_classWHERE relname='dummy_test_idx';
21-
22-
-- Silence validation checks for strings
25+
-- Silence again validation checks for strings until the end of the test.
2326
SET client_min_messages TO'warning';
27+
SELECT unnest(reloptions)FROM pg_classWHERE relname='dummy_test_idx';
2428

2529
-- ALTER INDEX .. SET
2630
ALTERINDEX dummy_test_idxSET (option_int=10);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp