Subject: [PATCH 2/2] fixup: rename defined to requested

From: Tomas Vondra <[email-masked]>
Date: Sat, 9 Jan 2021 00:56:43 +0100

---
 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--