public inbox for [email protected]  
help / color / mirror / Atom feed
[PATCH 2/2] fixup: rename defined to requested
24+ 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; 24+ 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] 24+ messages in thread

* [PATCH 2/2] fixup: rename defined to requested
@ 2021-01-08 23:56  Tomas Vondra <[email protected]>
  0 siblings, 0 replies; 24+ 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] 24+ messages in thread

* [PATCH 2/2] fixup: rename defined to requested
@ 2021-01-08 23:56  Tomas Vondra <[email protected]>
  0 siblings, 0 replies; 24+ 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] 24+ messages in thread

* [PATCH 2/2] fixup: rename defined to requested
@ 2021-01-08 23:56  Tomas Vondra <[email protected]>
  0 siblings, 0 replies; 24+ 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] 24+ messages in thread

* [PATCH 2/2] fixup: rename defined to requested
@ 2021-01-08 23:56  Tomas Vondra <[email protected]>
  0 siblings, 0 replies; 24+ 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] 24+ messages in thread

* [PATCH 2/2] fixup: rename defined to requested
@ 2021-01-08 23:56  Tomas Vondra <[email protected]>
  0 siblings, 0 replies; 24+ 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] 24+ messages in thread

* [PATCH 2/2] fixup: rename defined to requested
@ 2021-01-08 23:56  Tomas Vondra <[email protected]>
  0 siblings, 0 replies; 24+ 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] 24+ messages in thread

* [PATCH 2/2] fixup: rename defined to requested
@ 2021-01-08 23:56  Tomas Vondra <[email protected]>
  0 siblings, 0 replies; 24+ 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] 24+ messages in thread

* [PATCH 2/2] fixup: rename defined to requested
@ 2021-01-08 23:56  Tomas Vondra <[email protected]>
  0 siblings, 0 replies; 24+ 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] 24+ messages in thread

* [PATCH 2/2] fixup: rename defined to requested
@ 2021-01-08 23:56  Tomas Vondra <[email protected]>
  0 siblings, 0 replies; 24+ 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] 24+ messages in thread

* [PATCH 2/2] fixup: rename defined to requested
@ 2021-01-08 23:56  Tomas Vondra <[email protected]>
  0 siblings, 0 replies; 24+ 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] 24+ messages in thread

* [PATCH 2/2] fixup: rename defined to requested
@ 2021-01-08 23:56  Tomas Vondra <[email protected]>
  0 siblings, 0 replies; 24+ 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] 24+ messages in thread

* [PATCH 2/2] fixup: rename defined to requested
@ 2021-01-08 23:56  Tomas Vondra <[email protected]>
  0 siblings, 0 replies; 24+ 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] 24+ messages in thread

* [PATCH 2/2] fixup: rename defined to requested
@ 2021-01-08 23:56  Tomas Vondra <[email protected]>
  0 siblings, 0 replies; 24+ 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] 24+ messages in thread

* [PATCH 2/2] fixup: rename defined to requested
@ 2021-01-08 23:56  Tomas Vondra <[email protected]>
  0 siblings, 0 replies; 24+ 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] 24+ messages in thread

* [PATCH 2/2] fixup: rename defined to requested
@ 2021-01-08 23:56  Tomas Vondra <[email protected]>
  0 siblings, 0 replies; 24+ 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] 24+ messages in thread

* [PATCH 2/2] fixup: rename defined to requested
@ 2021-01-08 23:56  Tomas Vondra <[email protected]>
  0 siblings, 0 replies; 24+ 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] 24+ messages in thread

* [PATCH 2/2] fixup: rename defined to requested
@ 2021-01-08 23:56  Tomas Vondra <[email protected]>
  0 siblings, 0 replies; 24+ 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] 24+ messages in thread

* [PATCH 2/2] fixup: rename defined to requested
@ 2021-01-08 23:56  Tomas Vondra <[email protected]>
  0 siblings, 0 replies; 24+ 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] 24+ messages in thread

* [PATCH 2/2] fixup: rename defined to requested
@ 2021-01-08 23:56  Tomas Vondra <[email protected]>
  0 siblings, 0 replies; 24+ 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] 24+ messages in thread

* [PATCH 2/2] fixup: rename defined to requested
@ 2021-01-08 23:56  Tomas Vondra <[email protected]>
  0 siblings, 0 replies; 24+ 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] 24+ messages in thread

* Re: Flush some statistics within running transactions
@ 2026-01-30 14:37  Álvaro Herrera <[email protected]>
  0 siblings, 1 reply; 24+ messages in thread

From: Álvaro Herrera @ 2026-01-30 14:37 UTC (permalink / raw)
  To: Fujii Masao <[email protected]>; +Cc: Bertrand Drouvot <[email protected]>; Sami Imseih <[email protected]>; Michael Paquier <[email protected]>; [email protected]; Zsolt Parragi <[email protected]>; Andres Freund <[email protected]>

On 2026-Jan-30, Álvaro Herrera wrote:

> So apparently the first function to do this in postinit.c was added by
> commit c6dda1f48e57 -- and apparently it was mimicking
> CheckDeadLockAlert(), which at this time looked like this:

I'm now wondering if CheckDeadLockAlert() really needed to have this in
the first place, or it was just an exercise in paranoia ... it was added
by commit 6753333f55e1, with the discussion in [1], and it's not clear
to me that there was any theoretical or experimental evidence that it
was necessary; the thread didn't discuss it, and the commit message
doesn't either.  Added Andres to CC as committer to this thread, maybe
he remembers.

[1] https://www.postgresql.org/message-id/flat/20150115020335.GZ5245%40awork2.anarazel.de

Just for laughs I moved the SetLatch call in handle_sig_alarm() to the
bottom, and remove the ones in handlers, on the theory that by the time
the SetLatch call is reached, all the handlers have already run and thus
the flag variables are set.  Everything seems to continue to work:
https://cirrus-ci.com/build/5758839359799296

(Though to be honest, it's not clear to me why it would matter at which
point in handle_sig_alarm we call SetLatch relative to the variables
being set, given that these variables are only going to matter once the
signal handler returns to the original code and the next
CHECK_FOR_INTERRUPTS is hit.)

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"Pensar que el espectro que vemos es ilusorio no lo despoja de espanto,
sólo le suma el nuevo terror de la locura" (Perelandra, C.S. Lewis)






^ permalink  raw  reply  [nested|flat] 24+ messages in thread

* Re: Flush some statistics within running transactions
@ 2026-01-30 15:10  Andres Freund <[email protected]>
  parent: Álvaro Herrera <[email protected]>
  0 siblings, 1 reply; 24+ messages in thread

From: Andres Freund @ 2026-01-30 15:10 UTC (permalink / raw)
  To: Álvaro Herrera <[email protected]>; +Cc: Fujii Masao <[email protected]>; Bertrand Drouvot <[email protected]>; Sami Imseih <[email protected]>; Michael Paquier <[email protected]>; [email protected]; Zsolt Parragi <[email protected]>

Hi,

On 2026-01-30 15:37:57 +0100, Álvaro Herrera wrote:
> I'm now wondering if CheckDeadLockAlert() really needed to have this in
> the first place, or it was just an exercise in paranoia ... it was added
> by commit 6753333f55e1, with the discussion in [1], and it's not clear
> to me that there was any theoretical or experimental evidence that it
> was necessary; the thread didn't discuss it, and the commit message
> doesn't either.  Added Andres to CC as committer to this thread, maybe
> he remembers.

I don't remember. But back then way more complicated things were still running
in signal handlers, and some signal handlers were capable of interrupting
other signal handlers. Including doing crazy things like starting transactions
in signal handlers (e.g. to process notify interrupts), which in turn could
clear latches. So there was a lot more potential to stomp on each others work.

WRT the subject of this thread: I hope we aren't just enabling a timer to fire
once a second forever but only when there actually is outstanding work?

Greetings,

Andres Freund






^ permalink  raw  reply  [nested|flat] 24+ messages in thread

* Re: Flush some statistics within running transactions
@ 2026-01-30 16:18  Álvaro Herrera <[email protected]>
  parent: Andres Freund <[email protected]>
  0 siblings, 0 replies; 24+ messages in thread

From: Álvaro Herrera @ 2026-01-30 16:18 UTC (permalink / raw)
  To: Andres Freund <[email protected]>; +Cc: Fujii Masao <[email protected]>; Bertrand Drouvot <[email protected]>; Sami Imseih <[email protected]>; Michael Paquier <[email protected]>; [email protected]; Zsolt Parragi <[email protected]>

On 2026-Jan-30, Andres Freund wrote:

> I don't remember. But back then way more complicated things were still running
> in signal handlers, and some signal handlers were capable of interrupting
> other signal handlers. Including doing crazy things like starting transactions
> in signal handlers (e.g. to process notify interrupts), which in turn could
> clear latches. So there was a lot more potential to stomp on each others work.

OK, thanks for clarifying.  I think my proposal of moving the SetLatch()
needs more research, but it's likely the best way to address this
wrinkle.

> WRT the subject of this thread: I hope we aren't just enabling a timer
> to fire once a second forever but only when there actually is
> outstanding work?

I hope so too.  (Just to be clear, I'm not claiming $SUBJECT as its
potential committer, and haven't actually reviewed it.)

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"People get annoyed when you try to debug them."  (Larry Wall)






^ permalink  raw  reply  [nested|flat] 24+ messages in thread


end of thread, other threads:[~2026-01-30 16:18 UTC | newest]

Thread overview: 24+ 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]>
2026-01-30 14:37 Re: Flush some statistics within running transactions Álvaro Herrera <[email protected]>
2026-01-30 15:10 ` Re: Flush some statistics within running transactions Andres Freund <[email protected]>
2026-01-30 16:18   ` Re: Flush some statistics within running transactions Álvaro Herrera <[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