summaryrefslogtreecommitdiff
path: root/src/test/regress/expected
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/regress/expected')
-rw-r--r--src/test/regress/expected/stats_ext.out95
1 files changed, 86 insertions, 9 deletions
diff --git a/src/test/regress/expected/stats_ext.out b/src/test/regress/expected/stats_ext.out
index e9379afe39e..5a4077f8ed5 100644
--- a/src/test/regress/expected/stats_ext.out
+++ b/src/test/regress/expected/stats_ext.out
@@ -196,7 +196,8 @@ Statistics objects:
"public.ab1_a_b_stats" ON a, b FROM ab1; STATISTICS 0
ANALYZE ab1;
-SELECT stxname, jsonb_pretty(d.stxdndistinct::text::jsonb) AS stxdndistinct, stxddependencies, stxdmcv, stxdinherit
+SELECT stxname, jsonb_pretty(d.stxdndistinct::text::jsonb) AS stxdndistinct,
+ jsonb_pretty(d.stxddependencies::text::jsonb) AS stxddependencies, stxdmcv, stxdinherit
FROM pg_statistic_ext s LEFT JOIN pg_statistic_ext_data d ON (d.stxoid = s.oid)
WHERE s.stxname = 'ab1_a_b_stats';
stxname | stxdndistinct | stxddependencies | stxdmcv | stxdinherit
@@ -1433,10 +1434,48 @@ SELECT * FROM check_estimated_rows('SELECT * FROM functional_dependencies WHERE
CREATE STATISTICS func_deps_stat (dependencies) ON a, b, c FROM functional_dependencies;
ANALYZE functional_dependencies;
-- print the detected dependencies
-SELECT dependencies FROM pg_stats_ext WHERE statistics_name = 'func_deps_stat';
- dependencies
-------------------------------------------------------------------------------------------------------------
- {"3 => 4": 1.000000, "3 => 6": 1.000000, "4 => 6": 1.000000, "3, 4 => 6": 1.000000, "3, 6 => 4": 1.000000}
+SELECT jsonb_pretty(dependencies::text::jsonb) AS dependencies FROM pg_stats_ext WHERE statistics_name = 'func_deps_stat';
+ dependencies
+-----------------------------
+ [ +
+ { +
+ "degree": 1.000000,+
+ "attributes": [ +
+ 3 +
+ ], +
+ "dependency": 4 +
+ }, +
+ { +
+ "degree": 1.000000,+
+ "attributes": [ +
+ 3 +
+ ], +
+ "dependency": 6 +
+ }, +
+ { +
+ "degree": 1.000000,+
+ "attributes": [ +
+ 4 +
+ ], +
+ "dependency": 6 +
+ }, +
+ { +
+ "degree": 1.000000,+
+ "attributes": [ +
+ 3, +
+ 4 +
+ ], +
+ "dependency": 6 +
+ }, +
+ { +
+ "degree": 1.000000,+
+ "attributes": [ +
+ 3, +
+ 6 +
+ ], +
+ "dependency": 4 +
+ } +
+ ]
(1 row)
SELECT * FROM check_estimated_rows('SELECT * FROM functional_dependencies WHERE a = 1 AND b = ''1''');
@@ -1775,10 +1814,48 @@ SELECT * FROM check_estimated_rows('SELECT * FROM functional_dependencies WHERE
CREATE STATISTICS func_deps_stat (dependencies) ON (a * 2), upper(b), (c + 1) FROM functional_dependencies;
ANALYZE functional_dependencies;
-- print the detected dependencies
-SELECT dependencies FROM pg_stats_ext WHERE statistics_name = 'func_deps_stat';
- dependencies
-------------------------------------------------------------------------------------------------------------------------
- {"-1 => -2": 1.000000, "-1 => -3": 1.000000, "-2 => -3": 1.000000, "-1, -2 => -3": 1.000000, "-1, -3 => -2": 1.000000}
+SELECT jsonb_pretty(dependencies::text::jsonb) AS dependencies FROM pg_stats_ext WHERE statistics_name = 'func_deps_stat';
+ dependencies
+-----------------------------
+ [ +
+ { +
+ "degree": 1.000000,+
+ "attributes": [ +
+ -1 +
+ ], +
+ "dependency": -2 +
+ }, +
+ { +
+ "degree": 1.000000,+
+ "attributes": [ +
+ -1 +
+ ], +
+ "dependency": -3 +
+ }, +
+ { +
+ "degree": 1.000000,+
+ "attributes": [ +
+ -2 +
+ ], +
+ "dependency": -3 +
+ }, +
+ { +
+ "degree": 1.000000,+
+ "attributes": [ +
+ -1, +
+ -2 +
+ ], +
+ "dependency": -3 +
+ }, +
+ { +
+ "degree": 1.000000,+
+ "attributes": [ +
+ -1, +
+ -3 +
+ ], +
+ "dependency": -2 +
+ } +
+ ]
(1 row)
SELECT * FROM check_estimated_rows('SELECT * FROM functional_dependencies WHERE (a * 2) = 2 AND upper(b) = ''1''');