agora inbox for [email protected]help / color / mirror / Atom feed
[PATCH 2/2] fixup: rename defined to requested 23+ messages / 3 participants [nested] [flat]
* [PATCH 2/2] fixup: rename defined to requested @ 2021-01-08 23:56 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 23+ messages in thread From: Tomas Vondra @ 2021-01-08 23:56 UTC (permalink / raw) --- src/bin/psql/describe.c | 10 +-- src/test/regress/expected/stats_ext.out | 90 ++++++++++++------------- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 46f54199fb..83084f79d0 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -4440,10 +4440,10 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN es.stxndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN es.stxdependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies")); @@ -4452,13 +4452,13 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN esd.stxdndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxddependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxdmcv IS NOT NULL THEN 'built' \n" - " WHEN 'm' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'm' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies"), diff --git a/src/test/regress/expected/stats_ext.out b/src/test/regress/expected/stats_ext.out index 8c8a0afcf6..b3ae4de185 100644 --- a/src/test/regress/expected/stats_ext.out +++ b/src/test/regress/expected/stats_ext.out @@ -1741,9 +1741,9 @@ create statistics stts_s2.stts_yama (dependencies, mcv) on col1, col3 from stts_ insert into stts_t1 select i,i from generate_series(1,100) i; analyze stts_t1; \dX - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV -----------+------------------------+--------------------------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +----------+------------------------+--------------------------------------+-----------+--------------+----------- public | func_deps_stat | a, b, c FROM functional_dependencies | | built | public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built @@ -1751,70 +1751,70 @@ analyze stts_t1; public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built (12 rows) \dX stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+--------+-------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+--------+-------------------+-----------+--------------+----------- public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested (4 rows) \dX *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+-----------+-------------------------------+-----------+--------------+--------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+-----------+-------------------------------+-----------+--------------+----------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested (1 row) \dX+ - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size -----------+------------------------+--------------------------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | - public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB - public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes - public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes - tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +----------+------------------------+--------------------------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | + public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB + public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes + public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes + tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes (12 rows) \dX+ stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+--------+-------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+--------+-------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (4 rows) \dX+ *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+-----------+-------------------------------+-----------+--------------+---------+----------------+-------------------+---------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+-----------+-------------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (1 row) \dX+ stts_s2.stts_yama - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ----------+-----------+-------------------------+-----------+--------------+---------+----------------+-------------------+---------- - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +---------+-----------+-------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes (1 row) drop table stts_t1, stts_t2, stts_t3; -- 2.26.2 --------------B0278A9E952F6668D2DBEBA1-- ^ permalink raw reply [nested|flat] 23+ messages in thread
* [PATCH 2/2] fixup: rename defined to requested @ 2021-01-08 23:56 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 23+ messages in thread From: Tomas Vondra @ 2021-01-08 23:56 UTC (permalink / raw) --- src/bin/psql/describe.c | 10 +-- src/test/regress/expected/stats_ext.out | 90 ++++++++++++------------- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 46f54199fb..83084f79d0 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -4440,10 +4440,10 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN es.stxndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN es.stxdependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies")); @@ -4452,13 +4452,13 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN esd.stxdndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxddependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxdmcv IS NOT NULL THEN 'built' \n" - " WHEN 'm' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'm' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies"), diff --git a/src/test/regress/expected/stats_ext.out b/src/test/regress/expected/stats_ext.out index 8c8a0afcf6..b3ae4de185 100644 --- a/src/test/regress/expected/stats_ext.out +++ b/src/test/regress/expected/stats_ext.out @@ -1741,9 +1741,9 @@ create statistics stts_s2.stts_yama (dependencies, mcv) on col1, col3 from stts_ insert into stts_t1 select i,i from generate_series(1,100) i; analyze stts_t1; \dX - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV -----------+------------------------+--------------------------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +----------+------------------------+--------------------------------------+-----------+--------------+----------- public | func_deps_stat | a, b, c FROM functional_dependencies | | built | public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built @@ -1751,70 +1751,70 @@ analyze stts_t1; public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built (12 rows) \dX stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+--------+-------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+--------+-------------------+-----------+--------------+----------- public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested (4 rows) \dX *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+-----------+-------------------------------+-----------+--------------+--------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+-----------+-------------------------------+-----------+--------------+----------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested (1 row) \dX+ - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size -----------+------------------------+--------------------------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | - public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB - public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes - public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes - tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +----------+------------------------+--------------------------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | + public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB + public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes + public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes + tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes (12 rows) \dX+ stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+--------+-------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+--------+-------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (4 rows) \dX+ *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+-----------+-------------------------------+-----------+--------------+---------+----------------+-------------------+---------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+-----------+-------------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (1 row) \dX+ stts_s2.stts_yama - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ----------+-----------+-------------------------+-----------+--------------+---------+----------------+-------------------+---------- - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +---------+-----------+-------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes (1 row) drop table stts_t1, stts_t2, stts_t3; -- 2.26.2 --------------B0278A9E952F6668D2DBEBA1-- ^ permalink raw reply [nested|flat] 23+ messages in thread
* [PATCH 2/2] fixup: rename defined to requested @ 2021-01-08 23:56 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 23+ messages in thread From: Tomas Vondra @ 2021-01-08 23:56 UTC (permalink / raw) --- src/bin/psql/describe.c | 10 +-- src/test/regress/expected/stats_ext.out | 90 ++++++++++++------------- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 46f54199fb..83084f79d0 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -4440,10 +4440,10 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN es.stxndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN es.stxdependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies")); @@ -4452,13 +4452,13 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN esd.stxdndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxddependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxdmcv IS NOT NULL THEN 'built' \n" - " WHEN 'm' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'm' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies"), diff --git a/src/test/regress/expected/stats_ext.out b/src/test/regress/expected/stats_ext.out index 8c8a0afcf6..b3ae4de185 100644 --- a/src/test/regress/expected/stats_ext.out +++ b/src/test/regress/expected/stats_ext.out @@ -1741,9 +1741,9 @@ create statistics stts_s2.stts_yama (dependencies, mcv) on col1, col3 from stts_ insert into stts_t1 select i,i from generate_series(1,100) i; analyze stts_t1; \dX - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV -----------+------------------------+--------------------------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +----------+------------------------+--------------------------------------+-----------+--------------+----------- public | func_deps_stat | a, b, c FROM functional_dependencies | | built | public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built @@ -1751,70 +1751,70 @@ analyze stts_t1; public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built (12 rows) \dX stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+--------+-------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+--------+-------------------+-----------+--------------+----------- public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested (4 rows) \dX *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+-----------+-------------------------------+-----------+--------------+--------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+-----------+-------------------------------+-----------+--------------+----------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested (1 row) \dX+ - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size -----------+------------------------+--------------------------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | - public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB - public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes - public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes - tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +----------+------------------------+--------------------------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | + public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB + public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes + public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes + tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes (12 rows) \dX+ stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+--------+-------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+--------+-------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (4 rows) \dX+ *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+-----------+-------------------------------+-----------+--------------+---------+----------------+-------------------+---------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+-----------+-------------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (1 row) \dX+ stts_s2.stts_yama - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ----------+-----------+-------------------------+-----------+--------------+---------+----------------+-------------------+---------- - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +---------+-----------+-------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes (1 row) drop table stts_t1, stts_t2, stts_t3; -- 2.26.2 --------------B0278A9E952F6668D2DBEBA1-- ^ permalink raw reply [nested|flat] 23+ messages in thread
* [PATCH 2/2] fixup: rename defined to requested @ 2021-01-08 23:56 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 23+ messages in thread From: Tomas Vondra @ 2021-01-08 23:56 UTC (permalink / raw) --- src/bin/psql/describe.c | 10 +-- src/test/regress/expected/stats_ext.out | 90 ++++++++++++------------- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 46f54199fb..83084f79d0 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -4440,10 +4440,10 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN es.stxndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN es.stxdependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies")); @@ -4452,13 +4452,13 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN esd.stxdndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxddependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxdmcv IS NOT NULL THEN 'built' \n" - " WHEN 'm' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'm' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies"), diff --git a/src/test/regress/expected/stats_ext.out b/src/test/regress/expected/stats_ext.out index 8c8a0afcf6..b3ae4de185 100644 --- a/src/test/regress/expected/stats_ext.out +++ b/src/test/regress/expected/stats_ext.out @@ -1741,9 +1741,9 @@ create statistics stts_s2.stts_yama (dependencies, mcv) on col1, col3 from stts_ insert into stts_t1 select i,i from generate_series(1,100) i; analyze stts_t1; \dX - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV -----------+------------------------+--------------------------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +----------+------------------------+--------------------------------------+-----------+--------------+----------- public | func_deps_stat | a, b, c FROM functional_dependencies | | built | public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built @@ -1751,70 +1751,70 @@ analyze stts_t1; public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built (12 rows) \dX stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+--------+-------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+--------+-------------------+-----------+--------------+----------- public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested (4 rows) \dX *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+-----------+-------------------------------+-----------+--------------+--------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+-----------+-------------------------------+-----------+--------------+----------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested (1 row) \dX+ - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size -----------+------------------------+--------------------------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | - public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB - public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes - public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes - tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +----------+------------------------+--------------------------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | + public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB + public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes + public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes + tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes (12 rows) \dX+ stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+--------+-------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+--------+-------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (4 rows) \dX+ *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+-----------+-------------------------------+-----------+--------------+---------+----------------+-------------------+---------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+-----------+-------------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (1 row) \dX+ stts_s2.stts_yama - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ----------+-----------+-------------------------+-----------+--------------+---------+----------------+-------------------+---------- - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +---------+-----------+-------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes (1 row) drop table stts_t1, stts_t2, stts_t3; -- 2.26.2 --------------B0278A9E952F6668D2DBEBA1-- ^ permalink raw reply [nested|flat] 23+ messages in thread
* [PATCH 2/2] fixup: rename defined to requested @ 2021-01-08 23:56 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 23+ messages in thread From: Tomas Vondra @ 2021-01-08 23:56 UTC (permalink / raw) --- src/bin/psql/describe.c | 10 +-- src/test/regress/expected/stats_ext.out | 90 ++++++++++++------------- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 46f54199fb..83084f79d0 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -4440,10 +4440,10 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN es.stxndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN es.stxdependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies")); @@ -4452,13 +4452,13 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN esd.stxdndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxddependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxdmcv IS NOT NULL THEN 'built' \n" - " WHEN 'm' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'm' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies"), diff --git a/src/test/regress/expected/stats_ext.out b/src/test/regress/expected/stats_ext.out index 8c8a0afcf6..b3ae4de185 100644 --- a/src/test/regress/expected/stats_ext.out +++ b/src/test/regress/expected/stats_ext.out @@ -1741,9 +1741,9 @@ create statistics stts_s2.stts_yama (dependencies, mcv) on col1, col3 from stts_ insert into stts_t1 select i,i from generate_series(1,100) i; analyze stts_t1; \dX - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV -----------+------------------------+--------------------------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +----------+------------------------+--------------------------------------+-----------+--------------+----------- public | func_deps_stat | a, b, c FROM functional_dependencies | | built | public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built @@ -1751,70 +1751,70 @@ analyze stts_t1; public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built (12 rows) \dX stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+--------+-------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+--------+-------------------+-----------+--------------+----------- public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested (4 rows) \dX *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+-----------+-------------------------------+-----------+--------------+--------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+-----------+-------------------------------+-----------+--------------+----------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested (1 row) \dX+ - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size -----------+------------------------+--------------------------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | - public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB - public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes - public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes - tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +----------+------------------------+--------------------------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | + public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB + public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes + public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes + tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes (12 rows) \dX+ stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+--------+-------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+--------+-------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (4 rows) \dX+ *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+-----------+-------------------------------+-----------+--------------+---------+----------------+-------------------+---------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+-----------+-------------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (1 row) \dX+ stts_s2.stts_yama - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ----------+-----------+-------------------------+-----------+--------------+---------+----------------+-------------------+---------- - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +---------+-----------+-------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes (1 row) drop table stts_t1, stts_t2, stts_t3; -- 2.26.2 --------------B0278A9E952F6668D2DBEBA1-- ^ permalink raw reply [nested|flat] 23+ messages in thread
* [PATCH 2/2] fixup: rename defined to requested @ 2021-01-08 23:56 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 23+ messages in thread From: Tomas Vondra @ 2021-01-08 23:56 UTC (permalink / raw) --- src/bin/psql/describe.c | 10 +-- src/test/regress/expected/stats_ext.out | 90 ++++++++++++------------- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 46f54199fb..83084f79d0 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -4440,10 +4440,10 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN es.stxndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN es.stxdependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies")); @@ -4452,13 +4452,13 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN esd.stxdndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxddependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxdmcv IS NOT NULL THEN 'built' \n" - " WHEN 'm' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'm' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies"), diff --git a/src/test/regress/expected/stats_ext.out b/src/test/regress/expected/stats_ext.out index 8c8a0afcf6..b3ae4de185 100644 --- a/src/test/regress/expected/stats_ext.out +++ b/src/test/regress/expected/stats_ext.out @@ -1741,9 +1741,9 @@ create statistics stts_s2.stts_yama (dependencies, mcv) on col1, col3 from stts_ insert into stts_t1 select i,i from generate_series(1,100) i; analyze stts_t1; \dX - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV -----------+------------------------+--------------------------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +----------+------------------------+--------------------------------------+-----------+--------------+----------- public | func_deps_stat | a, b, c FROM functional_dependencies | | built | public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built @@ -1751,70 +1751,70 @@ analyze stts_t1; public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built (12 rows) \dX stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+--------+-------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+--------+-------------------+-----------+--------------+----------- public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested (4 rows) \dX *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+-----------+-------------------------------+-----------+--------------+--------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+-----------+-------------------------------+-----------+--------------+----------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested (1 row) \dX+ - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size -----------+------------------------+--------------------------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | - public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB - public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes - public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes - tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +----------+------------------------+--------------------------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | + public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB + public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes + public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes + tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes (12 rows) \dX+ stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+--------+-------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+--------+-------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (4 rows) \dX+ *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+-----------+-------------------------------+-----------+--------------+---------+----------------+-------------------+---------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+-----------+-------------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (1 row) \dX+ stts_s2.stts_yama - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ----------+-----------+-------------------------+-----------+--------------+---------+----------------+-------------------+---------- - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +---------+-----------+-------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes (1 row) drop table stts_t1, stts_t2, stts_t3; -- 2.26.2 --------------B0278A9E952F6668D2DBEBA1-- ^ permalink raw reply [nested|flat] 23+ messages in thread
* [PATCH 2/2] fixup: rename defined to requested @ 2021-01-08 23:56 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 23+ messages in thread From: Tomas Vondra @ 2021-01-08 23:56 UTC (permalink / raw) --- src/bin/psql/describe.c | 10 +-- src/test/regress/expected/stats_ext.out | 90 ++++++++++++------------- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 46f54199fb..83084f79d0 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -4440,10 +4440,10 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN es.stxndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN es.stxdependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies")); @@ -4452,13 +4452,13 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN esd.stxdndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxddependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxdmcv IS NOT NULL THEN 'built' \n" - " WHEN 'm' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'm' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies"), diff --git a/src/test/regress/expected/stats_ext.out b/src/test/regress/expected/stats_ext.out index 8c8a0afcf6..b3ae4de185 100644 --- a/src/test/regress/expected/stats_ext.out +++ b/src/test/regress/expected/stats_ext.out @@ -1741,9 +1741,9 @@ create statistics stts_s2.stts_yama (dependencies, mcv) on col1, col3 from stts_ insert into stts_t1 select i,i from generate_series(1,100) i; analyze stts_t1; \dX - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV -----------+------------------------+--------------------------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +----------+------------------------+--------------------------------------+-----------+--------------+----------- public | func_deps_stat | a, b, c FROM functional_dependencies | | built | public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built @@ -1751,70 +1751,70 @@ analyze stts_t1; public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built (12 rows) \dX stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+--------+-------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+--------+-------------------+-----------+--------------+----------- public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested (4 rows) \dX *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+-----------+-------------------------------+-----------+--------------+--------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+-----------+-------------------------------+-----------+--------------+----------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested (1 row) \dX+ - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size -----------+------------------------+--------------------------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | - public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB - public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes - public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes - tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +----------+------------------------+--------------------------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | + public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB + public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes + public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes + tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes (12 rows) \dX+ stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+--------+-------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+--------+-------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (4 rows) \dX+ *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+-----------+-------------------------------+-----------+--------------+---------+----------------+-------------------+---------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+-----------+-------------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (1 row) \dX+ stts_s2.stts_yama - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ----------+-----------+-------------------------+-----------+--------------+---------+----------------+-------------------+---------- - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +---------+-----------+-------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes (1 row) drop table stts_t1, stts_t2, stts_t3; -- 2.26.2 --------------B0278A9E952F6668D2DBEBA1-- ^ permalink raw reply [nested|flat] 23+ messages in thread
* [PATCH 2/2] fixup: rename defined to requested @ 2021-01-08 23:56 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 23+ messages in thread From: Tomas Vondra @ 2021-01-08 23:56 UTC (permalink / raw) --- src/bin/psql/describe.c | 10 +-- src/test/regress/expected/stats_ext.out | 90 ++++++++++++------------- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 46f54199fb..83084f79d0 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -4440,10 +4440,10 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN es.stxndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN es.stxdependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies")); @@ -4452,13 +4452,13 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN esd.stxdndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxddependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxdmcv IS NOT NULL THEN 'built' \n" - " WHEN 'm' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'm' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies"), diff --git a/src/test/regress/expected/stats_ext.out b/src/test/regress/expected/stats_ext.out index 8c8a0afcf6..b3ae4de185 100644 --- a/src/test/regress/expected/stats_ext.out +++ b/src/test/regress/expected/stats_ext.out @@ -1741,9 +1741,9 @@ create statistics stts_s2.stts_yama (dependencies, mcv) on col1, col3 from stts_ insert into stts_t1 select i,i from generate_series(1,100) i; analyze stts_t1; \dX - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV -----------+------------------------+--------------------------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +----------+------------------------+--------------------------------------+-----------+--------------+----------- public | func_deps_stat | a, b, c FROM functional_dependencies | | built | public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built @@ -1751,70 +1751,70 @@ analyze stts_t1; public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built (12 rows) \dX stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+--------+-------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+--------+-------------------+-----------+--------------+----------- public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested (4 rows) \dX *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+-----------+-------------------------------+-----------+--------------+--------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+-----------+-------------------------------+-----------+--------------+----------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested (1 row) \dX+ - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size -----------+------------------------+--------------------------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | - public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB - public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes - public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes - tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +----------+------------------------+--------------------------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | + public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB + public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes + public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes + tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes (12 rows) \dX+ stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+--------+-------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+--------+-------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (4 rows) \dX+ *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+-----------+-------------------------------+-----------+--------------+---------+----------------+-------------------+---------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+-----------+-------------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (1 row) \dX+ stts_s2.stts_yama - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ----------+-----------+-------------------------+-----------+--------------+---------+----------------+-------------------+---------- - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +---------+-----------+-------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes (1 row) drop table stts_t1, stts_t2, stts_t3; -- 2.26.2 --------------B0278A9E952F6668D2DBEBA1-- ^ permalink raw reply [nested|flat] 23+ messages in thread
* [PATCH 2/2] fixup: rename defined to requested @ 2021-01-08 23:56 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 23+ messages in thread From: Tomas Vondra @ 2021-01-08 23:56 UTC (permalink / raw) --- src/bin/psql/describe.c | 10 +-- src/test/regress/expected/stats_ext.out | 90 ++++++++++++------------- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 46f54199fb..83084f79d0 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -4440,10 +4440,10 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN es.stxndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN es.stxdependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies")); @@ -4452,13 +4452,13 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN esd.stxdndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxddependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxdmcv IS NOT NULL THEN 'built' \n" - " WHEN 'm' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'm' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies"), diff --git a/src/test/regress/expected/stats_ext.out b/src/test/regress/expected/stats_ext.out index 8c8a0afcf6..b3ae4de185 100644 --- a/src/test/regress/expected/stats_ext.out +++ b/src/test/regress/expected/stats_ext.out @@ -1741,9 +1741,9 @@ create statistics stts_s2.stts_yama (dependencies, mcv) on col1, col3 from stts_ insert into stts_t1 select i,i from generate_series(1,100) i; analyze stts_t1; \dX - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV -----------+------------------------+--------------------------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +----------+------------------------+--------------------------------------+-----------+--------------+----------- public | func_deps_stat | a, b, c FROM functional_dependencies | | built | public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built @@ -1751,70 +1751,70 @@ analyze stts_t1; public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built (12 rows) \dX stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+--------+-------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+--------+-------------------+-----------+--------------+----------- public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested (4 rows) \dX *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+-----------+-------------------------------+-----------+--------------+--------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+-----------+-------------------------------+-----------+--------------+----------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested (1 row) \dX+ - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size -----------+------------------------+--------------------------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | - public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB - public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes - public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes - tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +----------+------------------------+--------------------------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | + public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB + public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes + public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes + tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes (12 rows) \dX+ stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+--------+-------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+--------+-------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (4 rows) \dX+ *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+-----------+-------------------------------+-----------+--------------+---------+----------------+-------------------+---------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+-----------+-------------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (1 row) \dX+ stts_s2.stts_yama - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ----------+-----------+-------------------------+-----------+--------------+---------+----------------+-------------------+---------- - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +---------+-----------+-------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes (1 row) drop table stts_t1, stts_t2, stts_t3; -- 2.26.2 --------------B0278A9E952F6668D2DBEBA1-- ^ permalink raw reply [nested|flat] 23+ messages in thread
* [PATCH 2/2] fixup: rename defined to requested @ 2021-01-08 23:56 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 23+ messages in thread From: Tomas Vondra @ 2021-01-08 23:56 UTC (permalink / raw) --- src/bin/psql/describe.c | 10 +-- src/test/regress/expected/stats_ext.out | 90 ++++++++++++------------- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 46f54199fb..83084f79d0 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -4440,10 +4440,10 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN es.stxndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN es.stxdependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies")); @@ -4452,13 +4452,13 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN esd.stxdndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxddependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxdmcv IS NOT NULL THEN 'built' \n" - " WHEN 'm' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'm' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies"), diff --git a/src/test/regress/expected/stats_ext.out b/src/test/regress/expected/stats_ext.out index 8c8a0afcf6..b3ae4de185 100644 --- a/src/test/regress/expected/stats_ext.out +++ b/src/test/regress/expected/stats_ext.out @@ -1741,9 +1741,9 @@ create statistics stts_s2.stts_yama (dependencies, mcv) on col1, col3 from stts_ insert into stts_t1 select i,i from generate_series(1,100) i; analyze stts_t1; \dX - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV -----------+------------------------+--------------------------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +----------+------------------------+--------------------------------------+-----------+--------------+----------- public | func_deps_stat | a, b, c FROM functional_dependencies | | built | public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built @@ -1751,70 +1751,70 @@ analyze stts_t1; public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built (12 rows) \dX stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+--------+-------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+--------+-------------------+-----------+--------------+----------- public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested (4 rows) \dX *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+-----------+-------------------------------+-----------+--------------+--------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+-----------+-------------------------------+-----------+--------------+----------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested (1 row) \dX+ - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size -----------+------------------------+--------------------------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | - public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB - public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes - public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes - tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +----------+------------------------+--------------------------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | + public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB + public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes + public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes + tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes (12 rows) \dX+ stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+--------+-------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+--------+-------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (4 rows) \dX+ *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+-----------+-------------------------------+-----------+--------------+---------+----------------+-------------------+---------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+-----------+-------------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (1 row) \dX+ stts_s2.stts_yama - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ----------+-----------+-------------------------+-----------+--------------+---------+----------------+-------------------+---------- - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +---------+-----------+-------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes (1 row) drop table stts_t1, stts_t2, stts_t3; -- 2.26.2 --------------B0278A9E952F6668D2DBEBA1-- ^ permalink raw reply [nested|flat] 23+ messages in thread
* [PATCH 2/2] fixup: rename defined to requested @ 2021-01-08 23:56 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 23+ messages in thread From: Tomas Vondra @ 2021-01-08 23:56 UTC (permalink / raw) --- src/bin/psql/describe.c | 10 +-- src/test/regress/expected/stats_ext.out | 90 ++++++++++++------------- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 46f54199fb..83084f79d0 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -4440,10 +4440,10 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN es.stxndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN es.stxdependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies")); @@ -4452,13 +4452,13 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN esd.stxdndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxddependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxdmcv IS NOT NULL THEN 'built' \n" - " WHEN 'm' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'm' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies"), diff --git a/src/test/regress/expected/stats_ext.out b/src/test/regress/expected/stats_ext.out index 8c8a0afcf6..b3ae4de185 100644 --- a/src/test/regress/expected/stats_ext.out +++ b/src/test/regress/expected/stats_ext.out @@ -1741,9 +1741,9 @@ create statistics stts_s2.stts_yama (dependencies, mcv) on col1, col3 from stts_ insert into stts_t1 select i,i from generate_series(1,100) i; analyze stts_t1; \dX - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV -----------+------------------------+--------------------------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +----------+------------------------+--------------------------------------+-----------+--------------+----------- public | func_deps_stat | a, b, c FROM functional_dependencies | | built | public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built @@ -1751,70 +1751,70 @@ analyze stts_t1; public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built (12 rows) \dX stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+--------+-------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+--------+-------------------+-----------+--------------+----------- public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested (4 rows) \dX *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+-----------+-------------------------------+-----------+--------------+--------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+-----------+-------------------------------+-----------+--------------+----------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested (1 row) \dX+ - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size -----------+------------------------+--------------------------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | - public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB - public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes - public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes - tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +----------+------------------------+--------------------------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | + public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB + public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes + public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes + tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes (12 rows) \dX+ stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+--------+-------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+--------+-------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (4 rows) \dX+ *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+-----------+-------------------------------+-----------+--------------+---------+----------------+-------------------+---------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+-----------+-------------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (1 row) \dX+ stts_s2.stts_yama - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ----------+-----------+-------------------------+-----------+--------------+---------+----------------+-------------------+---------- - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +---------+-----------+-------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes (1 row) drop table stts_t1, stts_t2, stts_t3; -- 2.26.2 --------------B0278A9E952F6668D2DBEBA1-- ^ permalink raw reply [nested|flat] 23+ messages in thread
* [PATCH 2/2] fixup: rename defined to requested @ 2021-01-08 23:56 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 23+ messages in thread From: Tomas Vondra @ 2021-01-08 23:56 UTC (permalink / raw) --- src/bin/psql/describe.c | 10 +-- src/test/regress/expected/stats_ext.out | 90 ++++++++++++------------- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 46f54199fb..83084f79d0 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -4440,10 +4440,10 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN es.stxndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN es.stxdependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies")); @@ -4452,13 +4452,13 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN esd.stxdndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxddependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxdmcv IS NOT NULL THEN 'built' \n" - " WHEN 'm' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'm' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies"), diff --git a/src/test/regress/expected/stats_ext.out b/src/test/regress/expected/stats_ext.out index 8c8a0afcf6..b3ae4de185 100644 --- a/src/test/regress/expected/stats_ext.out +++ b/src/test/regress/expected/stats_ext.out @@ -1741,9 +1741,9 @@ create statistics stts_s2.stts_yama (dependencies, mcv) on col1, col3 from stts_ insert into stts_t1 select i,i from generate_series(1,100) i; analyze stts_t1; \dX - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV -----------+------------------------+--------------------------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +----------+------------------------+--------------------------------------+-----------+--------------+----------- public | func_deps_stat | a, b, c FROM functional_dependencies | | built | public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built @@ -1751,70 +1751,70 @@ analyze stts_t1; public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built (12 rows) \dX stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+--------+-------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+--------+-------------------+-----------+--------------+----------- public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested (4 rows) \dX *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+-----------+-------------------------------+-----------+--------------+--------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+-----------+-------------------------------+-----------+--------------+----------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested (1 row) \dX+ - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size -----------+------------------------+--------------------------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | - public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB - public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes - public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes - tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +----------+------------------------+--------------------------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | + public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB + public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes + public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes + tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes (12 rows) \dX+ stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+--------+-------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+--------+-------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (4 rows) \dX+ *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+-----------+-------------------------------+-----------+--------------+---------+----------------+-------------------+---------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+-----------+-------------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (1 row) \dX+ stts_s2.stts_yama - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ----------+-----------+-------------------------+-----------+--------------+---------+----------------+-------------------+---------- - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +---------+-----------+-------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes (1 row) drop table stts_t1, stts_t2, stts_t3; -- 2.26.2 --------------B0278A9E952F6668D2DBEBA1-- ^ permalink raw reply [nested|flat] 23+ messages in thread
* [PATCH 2/2] fixup: rename defined to requested @ 2021-01-08 23:56 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 23+ messages in thread From: Tomas Vondra @ 2021-01-08 23:56 UTC (permalink / raw) --- src/bin/psql/describe.c | 10 +-- src/test/regress/expected/stats_ext.out | 90 ++++++++++++------------- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 46f54199fb..83084f79d0 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -4440,10 +4440,10 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN es.stxndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN es.stxdependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies")); @@ -4452,13 +4452,13 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN esd.stxdndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxddependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxdmcv IS NOT NULL THEN 'built' \n" - " WHEN 'm' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'm' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies"), diff --git a/src/test/regress/expected/stats_ext.out b/src/test/regress/expected/stats_ext.out index 8c8a0afcf6..b3ae4de185 100644 --- a/src/test/regress/expected/stats_ext.out +++ b/src/test/regress/expected/stats_ext.out @@ -1741,9 +1741,9 @@ create statistics stts_s2.stts_yama (dependencies, mcv) on col1, col3 from stts_ insert into stts_t1 select i,i from generate_series(1,100) i; analyze stts_t1; \dX - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV -----------+------------------------+--------------------------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +----------+------------------------+--------------------------------------+-----------+--------------+----------- public | func_deps_stat | a, b, c FROM functional_dependencies | | built | public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built @@ -1751,70 +1751,70 @@ analyze stts_t1; public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built (12 rows) \dX stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+--------+-------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+--------+-------------------+-----------+--------------+----------- public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested (4 rows) \dX *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+-----------+-------------------------------+-----------+--------------+--------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+-----------+-------------------------------+-----------+--------------+----------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested (1 row) \dX+ - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size -----------+------------------------+--------------------------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | - public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB - public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes - public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes - tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +----------+------------------------+--------------------------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | + public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB + public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes + public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes + tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes (12 rows) \dX+ stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+--------+-------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+--------+-------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (4 rows) \dX+ *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+-----------+-------------------------------+-----------+--------------+---------+----------------+-------------------+---------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+-----------+-------------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (1 row) \dX+ stts_s2.stts_yama - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ----------+-----------+-------------------------+-----------+--------------+---------+----------------+-------------------+---------- - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +---------+-----------+-------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes (1 row) drop table stts_t1, stts_t2, stts_t3; -- 2.26.2 --------------B0278A9E952F6668D2DBEBA1-- ^ permalink raw reply [nested|flat] 23+ messages in thread
* [PATCH 2/2] fixup: rename defined to requested @ 2021-01-08 23:56 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 23+ messages in thread From: Tomas Vondra @ 2021-01-08 23:56 UTC (permalink / raw) --- src/bin/psql/describe.c | 10 +-- src/test/regress/expected/stats_ext.out | 90 ++++++++++++------------- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 46f54199fb..83084f79d0 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -4440,10 +4440,10 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN es.stxndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN es.stxdependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies")); @@ -4452,13 +4452,13 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN esd.stxdndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxddependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxdmcv IS NOT NULL THEN 'built' \n" - " WHEN 'm' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'm' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies"), diff --git a/src/test/regress/expected/stats_ext.out b/src/test/regress/expected/stats_ext.out index 8c8a0afcf6..b3ae4de185 100644 --- a/src/test/regress/expected/stats_ext.out +++ b/src/test/regress/expected/stats_ext.out @@ -1741,9 +1741,9 @@ create statistics stts_s2.stts_yama (dependencies, mcv) on col1, col3 from stts_ insert into stts_t1 select i,i from generate_series(1,100) i; analyze stts_t1; \dX - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV -----------+------------------------+--------------------------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +----------+------------------------+--------------------------------------+-----------+--------------+----------- public | func_deps_stat | a, b, c FROM functional_dependencies | | built | public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built @@ -1751,70 +1751,70 @@ analyze stts_t1; public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built (12 rows) \dX stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+--------+-------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+--------+-------------------+-----------+--------------+----------- public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested (4 rows) \dX *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+-----------+-------------------------------+-----------+--------------+--------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+-----------+-------------------------------+-----------+--------------+----------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested (1 row) \dX+ - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size -----------+------------------------+--------------------------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | - public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB - public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes - public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes - tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +----------+------------------------+--------------------------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | + public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB + public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes + public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes + tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes (12 rows) \dX+ stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+--------+-------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+--------+-------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (4 rows) \dX+ *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+-----------+-------------------------------+-----------+--------------+---------+----------------+-------------------+---------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+-----------+-------------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (1 row) \dX+ stts_s2.stts_yama - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ----------+-----------+-------------------------+-----------+--------------+---------+----------------+-------------------+---------- - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +---------+-----------+-------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes (1 row) drop table stts_t1, stts_t2, stts_t3; -- 2.26.2 --------------B0278A9E952F6668D2DBEBA1-- ^ permalink raw reply [nested|flat] 23+ messages in thread
* [PATCH 2/2] fixup: rename defined to requested @ 2021-01-08 23:56 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 23+ messages in thread From: Tomas Vondra @ 2021-01-08 23:56 UTC (permalink / raw) --- src/bin/psql/describe.c | 10 +-- src/test/regress/expected/stats_ext.out | 90 ++++++++++++------------- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 46f54199fb..83084f79d0 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -4440,10 +4440,10 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN es.stxndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN es.stxdependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies")); @@ -4452,13 +4452,13 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN esd.stxdndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxddependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxdmcv IS NOT NULL THEN 'built' \n" - " WHEN 'm' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'm' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies"), diff --git a/src/test/regress/expected/stats_ext.out b/src/test/regress/expected/stats_ext.out index 8c8a0afcf6..b3ae4de185 100644 --- a/src/test/regress/expected/stats_ext.out +++ b/src/test/regress/expected/stats_ext.out @@ -1741,9 +1741,9 @@ create statistics stts_s2.stts_yama (dependencies, mcv) on col1, col3 from stts_ insert into stts_t1 select i,i from generate_series(1,100) i; analyze stts_t1; \dX - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV -----------+------------------------+--------------------------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +----------+------------------------+--------------------------------------+-----------+--------------+----------- public | func_deps_stat | a, b, c FROM functional_dependencies | | built | public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built @@ -1751,70 +1751,70 @@ analyze stts_t1; public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built (12 rows) \dX stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+--------+-------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+--------+-------------------+-----------+--------------+----------- public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested (4 rows) \dX *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+-----------+-------------------------------+-----------+--------------+--------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+-----------+-------------------------------+-----------+--------------+----------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested (1 row) \dX+ - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size -----------+------------------------+--------------------------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | - public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB - public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes - public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes - tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +----------+------------------------+--------------------------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | + public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB + public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes + public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes + tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes (12 rows) \dX+ stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+--------+-------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+--------+-------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (4 rows) \dX+ *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+-----------+-------------------------------+-----------+--------------+---------+----------------+-------------------+---------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+-----------+-------------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (1 row) \dX+ stts_s2.stts_yama - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ----------+-----------+-------------------------+-----------+--------------+---------+----------------+-------------------+---------- - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +---------+-----------+-------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes (1 row) drop table stts_t1, stts_t2, stts_t3; -- 2.26.2 --------------B0278A9E952F6668D2DBEBA1-- ^ permalink raw reply [nested|flat] 23+ messages in thread
* [PATCH 2/2] fixup: rename defined to requested @ 2021-01-08 23:56 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 23+ messages in thread From: Tomas Vondra @ 2021-01-08 23:56 UTC (permalink / raw) --- src/bin/psql/describe.c | 10 +-- src/test/regress/expected/stats_ext.out | 90 ++++++++++++------------- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 46f54199fb..83084f79d0 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -4440,10 +4440,10 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN es.stxndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN es.stxdependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies")); @@ -4452,13 +4452,13 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN esd.stxdndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxddependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxdmcv IS NOT NULL THEN 'built' \n" - " WHEN 'm' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'm' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies"), diff --git a/src/test/regress/expected/stats_ext.out b/src/test/regress/expected/stats_ext.out index 8c8a0afcf6..b3ae4de185 100644 --- a/src/test/regress/expected/stats_ext.out +++ b/src/test/regress/expected/stats_ext.out @@ -1741,9 +1741,9 @@ create statistics stts_s2.stts_yama (dependencies, mcv) on col1, col3 from stts_ insert into stts_t1 select i,i from generate_series(1,100) i; analyze stts_t1; \dX - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV -----------+------------------------+--------------------------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +----------+------------------------+--------------------------------------+-----------+--------------+----------- public | func_deps_stat | a, b, c FROM functional_dependencies | | built | public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built @@ -1751,70 +1751,70 @@ analyze stts_t1; public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built (12 rows) \dX stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+--------+-------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+--------+-------------------+-----------+--------------+----------- public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested (4 rows) \dX *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+-----------+-------------------------------+-----------+--------------+--------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+-----------+-------------------------------+-----------+--------------+----------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested (1 row) \dX+ - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size -----------+------------------------+--------------------------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | - public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB - public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes - public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes - tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +----------+------------------------+--------------------------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | + public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB + public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes + public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes + tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes (12 rows) \dX+ stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+--------+-------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+--------+-------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (4 rows) \dX+ *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+-----------+-------------------------------+-----------+--------------+---------+----------------+-------------------+---------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+-----------+-------------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (1 row) \dX+ stts_s2.stts_yama - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ----------+-----------+-------------------------+-----------+--------------+---------+----------------+-------------------+---------- - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +---------+-----------+-------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes (1 row) drop table stts_t1, stts_t2, stts_t3; -- 2.26.2 --------------B0278A9E952F6668D2DBEBA1-- ^ permalink raw reply [nested|flat] 23+ messages in thread
* [PATCH 2/2] fixup: rename defined to requested @ 2021-01-08 23:56 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 23+ messages in thread From: Tomas Vondra @ 2021-01-08 23:56 UTC (permalink / raw) --- src/bin/psql/describe.c | 10 +-- src/test/regress/expected/stats_ext.out | 90 ++++++++++++------------- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 46f54199fb..83084f79d0 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -4440,10 +4440,10 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN es.stxndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN es.stxdependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies")); @@ -4452,13 +4452,13 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN esd.stxdndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxddependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxdmcv IS NOT NULL THEN 'built' \n" - " WHEN 'm' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'm' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies"), diff --git a/src/test/regress/expected/stats_ext.out b/src/test/regress/expected/stats_ext.out index 8c8a0afcf6..b3ae4de185 100644 --- a/src/test/regress/expected/stats_ext.out +++ b/src/test/regress/expected/stats_ext.out @@ -1741,9 +1741,9 @@ create statistics stts_s2.stts_yama (dependencies, mcv) on col1, col3 from stts_ insert into stts_t1 select i,i from generate_series(1,100) i; analyze stts_t1; \dX - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV -----------+------------------------+--------------------------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +----------+------------------------+--------------------------------------+-----------+--------------+----------- public | func_deps_stat | a, b, c FROM functional_dependencies | | built | public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built @@ -1751,70 +1751,70 @@ analyze stts_t1; public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built (12 rows) \dX stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+--------+-------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+--------+-------------------+-----------+--------------+----------- public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested (4 rows) \dX *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+-----------+-------------------------------+-----------+--------------+--------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+-----------+-------------------------------+-----------+--------------+----------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested (1 row) \dX+ - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size -----------+------------------------+--------------------------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | - public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB - public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes - public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes - tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +----------+------------------------+--------------------------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | + public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB + public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes + public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes + tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes (12 rows) \dX+ stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+--------+-------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+--------+-------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (4 rows) \dX+ *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+-----------+-------------------------------+-----------+--------------+---------+----------------+-------------------+---------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+-----------+-------------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (1 row) \dX+ stts_s2.stts_yama - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ----------+-----------+-------------------------+-----------+--------------+---------+----------------+-------------------+---------- - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +---------+-----------+-------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes (1 row) drop table stts_t1, stts_t2, stts_t3; -- 2.26.2 --------------B0278A9E952F6668D2DBEBA1-- ^ permalink raw reply [nested|flat] 23+ messages in thread
* [PATCH 2/2] fixup: rename defined to requested @ 2021-01-08 23:56 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 23+ messages in thread From: Tomas Vondra @ 2021-01-08 23:56 UTC (permalink / raw) --- src/bin/psql/describe.c | 10 +-- src/test/regress/expected/stats_ext.out | 90 ++++++++++++------------- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 46f54199fb..83084f79d0 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -4440,10 +4440,10 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN es.stxndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN es.stxdependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies")); @@ -4452,13 +4452,13 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN esd.stxdndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxddependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxdmcv IS NOT NULL THEN 'built' \n" - " WHEN 'm' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'm' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies"), diff --git a/src/test/regress/expected/stats_ext.out b/src/test/regress/expected/stats_ext.out index 8c8a0afcf6..b3ae4de185 100644 --- a/src/test/regress/expected/stats_ext.out +++ b/src/test/regress/expected/stats_ext.out @@ -1741,9 +1741,9 @@ create statistics stts_s2.stts_yama (dependencies, mcv) on col1, col3 from stts_ insert into stts_t1 select i,i from generate_series(1,100) i; analyze stts_t1; \dX - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV -----------+------------------------+--------------------------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +----------+------------------------+--------------------------------------+-----------+--------------+----------- public | func_deps_stat | a, b, c FROM functional_dependencies | | built | public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built @@ -1751,70 +1751,70 @@ analyze stts_t1; public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built (12 rows) \dX stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+--------+-------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+--------+-------------------+-----------+--------------+----------- public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested (4 rows) \dX *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+-----------+-------------------------------+-----------+--------------+--------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+-----------+-------------------------------+-----------+--------------+----------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested (1 row) \dX+ - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size -----------+------------------------+--------------------------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | - public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB - public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes - public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes - tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +----------+------------------------+--------------------------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | + public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB + public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes + public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes + tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes (12 rows) \dX+ stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+--------+-------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+--------+-------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (4 rows) \dX+ *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+-----------+-------------------------------+-----------+--------------+---------+----------------+-------------------+---------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+-----------+-------------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (1 row) \dX+ stts_s2.stts_yama - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ----------+-----------+-------------------------+-----------+--------------+---------+----------------+-------------------+---------- - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +---------+-----------+-------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes (1 row) drop table stts_t1, stts_t2, stts_t3; -- 2.26.2 --------------B0278A9E952F6668D2DBEBA1-- ^ permalink raw reply [nested|flat] 23+ messages in thread
* [PATCH 2/2] fixup: rename defined to requested @ 2021-01-08 23:56 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 23+ messages in thread From: Tomas Vondra @ 2021-01-08 23:56 UTC (permalink / raw) --- src/bin/psql/describe.c | 10 +-- src/test/regress/expected/stats_ext.out | 90 ++++++++++++------------- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 46f54199fb..83084f79d0 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -4440,10 +4440,10 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN es.stxndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN es.stxdependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies")); @@ -4452,13 +4452,13 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN esd.stxdndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxddependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxdmcv IS NOT NULL THEN 'built' \n" - " WHEN 'm' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'm' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies"), diff --git a/src/test/regress/expected/stats_ext.out b/src/test/regress/expected/stats_ext.out index 8c8a0afcf6..b3ae4de185 100644 --- a/src/test/regress/expected/stats_ext.out +++ b/src/test/regress/expected/stats_ext.out @@ -1741,9 +1741,9 @@ create statistics stts_s2.stts_yama (dependencies, mcv) on col1, col3 from stts_ insert into stts_t1 select i,i from generate_series(1,100) i; analyze stts_t1; \dX - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV -----------+------------------------+--------------------------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +----------+------------------------+--------------------------------------+-----------+--------------+----------- public | func_deps_stat | a, b, c FROM functional_dependencies | | built | public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built @@ -1751,70 +1751,70 @@ analyze stts_t1; public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built (12 rows) \dX stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+--------+-------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+--------+-------------------+-----------+--------------+----------- public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested (4 rows) \dX *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+-----------+-------------------------------+-----------+--------------+--------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+-----------+-------------------------------+-----------+--------------+----------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested (1 row) \dX+ - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size -----------+------------------------+--------------------------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | - public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB - public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes - public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes - tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +----------+------------------------+--------------------------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | + public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB + public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes + public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes + tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes (12 rows) \dX+ stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+--------+-------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+--------+-------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (4 rows) \dX+ *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+-----------+-------------------------------+-----------+--------------+---------+----------------+-------------------+---------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+-----------+-------------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (1 row) \dX+ stts_s2.stts_yama - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ----------+-----------+-------------------------+-----------+--------------+---------+----------------+-------------------+---------- - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +---------+-----------+-------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes (1 row) drop table stts_t1, stts_t2, stts_t3; -- 2.26.2 --------------B0278A9E952F6668D2DBEBA1-- ^ permalink raw reply [nested|flat] 23+ messages in thread
* [PATCH 2/2] fixup: rename defined to requested @ 2021-01-08 23:56 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 23+ messages in thread From: Tomas Vondra @ 2021-01-08 23:56 UTC (permalink / raw) --- src/bin/psql/describe.c | 10 +-- src/test/regress/expected/stats_ext.out | 90 ++++++++++++------------- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 46f54199fb..83084f79d0 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -4440,10 +4440,10 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN es.stxndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN es.stxdependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies")); @@ -4452,13 +4452,13 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN esd.stxdndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxddependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxdmcv IS NOT NULL THEN 'built' \n" - " WHEN 'm' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'm' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies"), diff --git a/src/test/regress/expected/stats_ext.out b/src/test/regress/expected/stats_ext.out index 8c8a0afcf6..b3ae4de185 100644 --- a/src/test/regress/expected/stats_ext.out +++ b/src/test/regress/expected/stats_ext.out @@ -1741,9 +1741,9 @@ create statistics stts_s2.stts_yama (dependencies, mcv) on col1, col3 from stts_ insert into stts_t1 select i,i from generate_series(1,100) i; analyze stts_t1; \dX - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV -----------+------------------------+--------------------------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +----------+------------------------+--------------------------------------+-----------+--------------+----------- public | func_deps_stat | a, b, c FROM functional_dependencies | | built | public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built @@ -1751,70 +1751,70 @@ analyze stts_t1; public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built (12 rows) \dX stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+--------+-------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+--------+-------------------+-----------+--------------+----------- public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested (4 rows) \dX *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+-----------+-------------------------------+-----------+--------------+--------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+-----------+-------------------------------+-----------+--------------+----------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested (1 row) \dX+ - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size -----------+------------------------+--------------------------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | - public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB - public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes - public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes - tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +----------+------------------------+--------------------------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | + public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB + public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes + public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes + tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes (12 rows) \dX+ stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+--------+-------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+--------+-------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (4 rows) \dX+ *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+-----------+-------------------------------+-----------+--------------+---------+----------------+-------------------+---------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+-----------+-------------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (1 row) \dX+ stts_s2.stts_yama - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ----------+-----------+-------------------------+-----------+--------------+---------+----------------+-------------------+---------- - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +---------+-----------+-------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes (1 row) drop table stts_t1, stts_t2, stts_t3; -- 2.26.2 --------------B0278A9E952F6668D2DBEBA1-- ^ permalink raw reply [nested|flat] 23+ messages in thread
* [PATCH 2/2] fixup: rename defined to requested @ 2021-01-08 23:56 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 23+ messages in thread From: Tomas Vondra @ 2021-01-08 23:56 UTC (permalink / raw) --- src/bin/psql/describe.c | 10 +-- src/test/regress/expected/stats_ext.out | 90 ++++++++++++------------- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 46f54199fb..83084f79d0 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -4440,10 +4440,10 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN es.stxndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN es.stxdependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies")); @@ -4452,13 +4452,13 @@ listExtendedStats(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\nCASE WHEN esd.stxdndistinct IS NOT NULL THEN 'built' \n" - " WHEN 'd' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'd' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxddependencies IS NOT NULL THEN 'built' \n" - " WHEN 'f' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'f' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\", \n" "CASE WHEN esd.stxdmcv IS NOT NULL THEN 'built' \n" - " WHEN 'm' = any(es.stxkind) THEN 'defined' \n" + " WHEN 'm' = any(es.stxkind) THEN 'requested' \n" "END AS \"%s\"", gettext_noop("Ndistinct"), gettext_noop("Dependencies"), diff --git a/src/test/regress/expected/stats_ext.out b/src/test/regress/expected/stats_ext.out index 8c8a0afcf6..b3ae4de185 100644 --- a/src/test/regress/expected/stats_ext.out +++ b/src/test/regress/expected/stats_ext.out @@ -1741,9 +1741,9 @@ create statistics stts_s2.stts_yama (dependencies, mcv) on col1, col3 from stts_ insert into stts_t1 select i,i from generate_series(1,100) i; analyze stts_t1; \dX - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV -----------+------------------------+--------------------------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +----------+------------------------+--------------------------------------+-----------+--------------+----------- public | func_deps_stat | a, b, c FROM functional_dependencies | | built | public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built @@ -1751,70 +1751,70 @@ analyze stts_t1; public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built (12 rows) \dX stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+--------+-------------------+-----------+--------------+--------- + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+--------+-------------------+-----------+--------------+----------- public | stts_1 | a, b FROM stts_t1 | built | | public | stts_2 | a, b FROM stts_t1 | built | built | public | stts_3 | a, b FROM stts_t1 | built | built | built - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested (4 rows) \dX *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV ---------+-----------+-------------------------------+-----------+--------------+--------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+-----------+-------------------------------+-----------+--------------+----------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested (1 row) \dX+ - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size -----------+------------------------+--------------------------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | - public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB - public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes - public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s1 | stts_foo | col1, col2 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes - tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +----------+------------------------+--------------------------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | func_deps_stat | a, b, c FROM functional_dependencies | | built | | | 106 bytes | + public | mcv_lists_arrays_stats | a, b, c FROM mcv_lists_arrays | | | built | | | 24 kB + public | mcv_lists_bool_stats | a, b, c FROM mcv_lists_bool | | | built | | | 386 bytes + public | mcv_lists_stats | a, b, d FROM mcv_lists | | | built | | | 294 bytes + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s1 | stts_foo | col1, col2 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes + tststats | priv_test_stats | a, b FROM tststats.priv_test_tbl | | | built | | | 686 bytes (12 rows) \dX+ stts_? - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+--------+-------------------+-----------+--------------+---------+----------------+-------------------+------------ - public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | - public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | - public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes - public | stts_4 | b, c FROM stts_t2 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+--------+-------------------+-----------+--------------+-----------+----------------+-------------------+------------ + public | stts_1 | a, b FROM stts_t1 | built | | | 13 bytes | | + public | stts_2 | a, b FROM stts_t1 | built | built | | 13 bytes | 40 bytes | + public | stts_3 | a, b FROM stts_t1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes + public | stts_4 | b, c FROM stts_t2 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (4 rows) \dX+ *stts_hoge - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ---------+-----------+-------------------------------+-----------+--------------+---------+----------------+-------------------+---------- - public | stts_hoge | col1, col2, col3 FROM stts_t3 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +--------+-----------+-------------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + public | stts_hoge | col1, col2, col3 FROM stts_t3 | requested | requested | requested | 0 bytes | 0 bytes | 0 bytes (1 row) \dX+ stts_s2.stts_yama - List of extended statistics - Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size ----------+-----------+-------------------------+-----------+--------------+---------+----------------+-------------------+---------- - stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | defined | defined | | 0 bytes | 0 bytes + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV | Ndistinct_size | Dependencies_size | MCV_size +---------+-----------+-------------------------+-----------+--------------+-----------+----------------+-------------------+---------- + stts_s2 | stts_yama | col1, col3 FROM stts_t3 | | requested | requested | | 0 bytes | 0 bytes (1 row) drop table stts_t1, stts_t2, stts_t3; -- 2.26.2 --------------B0278A9E952F6668D2DBEBA1-- ^ permalink raw reply [nested|flat] 23+ messages in thread
* Re: speed up a logical replica setup @ 2024-01-03 09:19 Amit Kapila <[email protected]> 2024-01-03 09:47 ` Re: speed up a logical replica setup vignesh C <[email protected]> 0 siblings, 1 reply; 23+ messages in thread From: Amit Kapila @ 2024-01-03 09:19 UTC (permalink / raw) To: vignesh C <[email protected]>; +Cc: Ashutosh Bapat <[email protected]>; Euler Taveira <[email protected]>; [email protected]; Andres Freund <[email protected]>; Peter Eisentraut <[email protected]> On Wed, Jan 3, 2024 at 12:09 PM vignesh C <[email protected]> wrote: > > On Wed, 1 Nov 2023 at 19:28, Ashutosh Bapat > <[email protected]> wrote: > > > > At this stage the standby would have various replication objects like > > publications, subscriptions, origins inherited from the upstream > > server and possibly very much active. With failover slots, it might > > inherit replication slots. Is it intended that the new subscriber also > > acts as publisher for source's subscribers OR that the new subscriber > > should subscribe to the upstreams of the source? Some use cases like > > logical standby might require that but a multi-master multi-node setup > > may not. The behaviour should be user configurable. > > How about we do like this: > a) Starting the server in binary upgrade mode(so that the existing > subscriptions will not try to connect to the publishers) > Can't we simply do it by starting the server with max_logical_replication_workers = 0 or is there some other need to start in binary upgrade mode? b) Disable > the subscriptions > Why not simply drop the subscriptions? c) Drop the replication slots d) Drop the > publications > I am not so sure about dropping publications because, unlike subscriptions which can start to pull the data, there is no harm with publications. Similar to publications there could be some user-defined functions or other other objects which may not be required once the standby replica is converted to subscriber. I guess we need to leave those to the user. e) Then restart the server in normal(non-upgrade) mode. > f) The rest of pg_subscriber work like > create_all_logical_replication_slots, create_subscription, > set_replication_progress, enable_subscription, etc > This will be done by default. There will be an option > --clean-logical-replication-info provided to allow DBA not to clean > the objects if DBA does not want to remove these objects. > I agree that some kind of switch to control this action would be useful. -- With Regards, Amit Kapila. ^ permalink raw reply [nested|flat] 23+ messages in thread
* Re: speed up a logical replica setup 2024-01-03 09:19 Re: speed up a logical replica setup Amit Kapila <[email protected]> @ 2024-01-03 09:47 ` vignesh C <[email protected]> 0 siblings, 0 replies; 23+ messages in thread From: vignesh C @ 2024-01-03 09:47 UTC (permalink / raw) To: Amit Kapila <[email protected]>; +Cc: Ashutosh Bapat <[email protected]>; Euler Taveira <[email protected]>; [email protected]; Andres Freund <[email protected]>; Peter Eisentraut <[email protected]> On Wed, 3 Jan 2024 at 14:49, Amit Kapila <[email protected]> wrote: > > On Wed, Jan 3, 2024 at 12:09 PM vignesh C <[email protected]> wrote: > > > > On Wed, 1 Nov 2023 at 19:28, Ashutosh Bapat > > <[email protected]> wrote: > > > > > > At this stage the standby would have various replication objects like > > > publications, subscriptions, origins inherited from the upstream > > > server and possibly very much active. With failover slots, it might > > > inherit replication slots. Is it intended that the new subscriber also > > > acts as publisher for source's subscribers OR that the new subscriber > > > should subscribe to the upstreams of the source? Some use cases like > > > logical standby might require that but a multi-master multi-node setup > > > may not. The behaviour should be user configurable. > > > > How about we do like this: > > a) Starting the server in binary upgrade mode(so that the existing > > subscriptions will not try to connect to the publishers) > > > > Can't we simply do it by starting the server with > max_logical_replication_workers = 0 or is there some other need to > start in binary upgrade mode? I agree, max_logical_replication_workers = 0 is enough for our case. > b) Disable > > the subscriptions > > > > Why not simply drop the subscriptions? Dropping subscriptions is ok as these subscriptions will not be required. > c) Drop the replication slots d) Drop the > > publications > > > > I am not so sure about dropping publications because, unlike > subscriptions which can start to pull the data, there is no harm with > publications. Similar to publications there could be some user-defined > functions or other other objects which may not be required once the > standby replica is converted to subscriber. I guess we need to leave > those to the user. Yes, that makes sense. Regards, Vignesh ^ permalink raw reply [nested|flat] 23+ messages in thread
end of thread, other threads:[~2024-01-03 09:47 UTC | newest] Thread overview: 23+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-01-08 23:56 [PATCH 2/2] fixup: rename defined to requested Tomas Vondra <[email protected]> 2021-01-08 23:56 [PATCH 2/2] fixup: rename defined to requested Tomas Vondra <[email protected]> 2021-01-08 23:56 [PATCH 2/2] fixup: rename defined to requested Tomas Vondra <[email protected]> 2021-01-08 23:56 [PATCH 2/2] fixup: rename defined to requested Tomas Vondra <[email protected]> 2021-01-08 23:56 [PATCH 2/2] fixup: rename defined to requested Tomas Vondra <[email protected]> 2021-01-08 23:56 [PATCH 2/2] fixup: rename defined to requested Tomas Vondra <[email protected]> 2021-01-08 23:56 [PATCH 2/2] fixup: rename defined to requested Tomas Vondra <[email protected]> 2021-01-08 23:56 [PATCH 2/2] fixup: rename defined to requested Tomas Vondra <[email protected]> 2021-01-08 23:56 [PATCH 2/2] fixup: rename defined to requested Tomas Vondra <[email protected]> 2021-01-08 23:56 [PATCH 2/2] fixup: rename defined to requested Tomas Vondra <[email protected]> 2021-01-08 23:56 [PATCH 2/2] fixup: rename defined to requested Tomas Vondra <[email protected]> 2021-01-08 23:56 [PATCH 2/2] fixup: rename defined to requested Tomas Vondra <[email protected]> 2021-01-08 23:56 [PATCH 2/2] fixup: rename defined to requested Tomas Vondra <[email protected]> 2021-01-08 23:56 [PATCH 2/2] fixup: rename defined to requested Tomas Vondra <[email protected]> 2021-01-08 23:56 [PATCH 2/2] fixup: rename defined to requested Tomas Vondra <[email protected]> 2021-01-08 23:56 [PATCH 2/2] fixup: rename defined to requested Tomas Vondra <[email protected]> 2021-01-08 23:56 [PATCH 2/2] fixup: rename defined to requested Tomas Vondra <[email protected]> 2021-01-08 23:56 [PATCH 2/2] fixup: rename defined to requested Tomas Vondra <[email protected]> 2021-01-08 23:56 [PATCH 2/2] fixup: rename defined to requested Tomas Vondra <[email protected]> 2021-01-08 23:56 [PATCH 2/2] fixup: rename defined to requested Tomas Vondra <[email protected]> 2021-01-08 23:56 [PATCH 2/2] fixup: rename defined to requested Tomas Vondra <[email protected]> 2024-01-03 09:19 Re: speed up a logical replica setup Amit Kapila <[email protected]> 2024-01-03 09:47 ` Re: speed up a logical replica setup vignesh C <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox