summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2017-05-02 18:49:32 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2017-05-02 18:49:32 -0300
commit93bbeec6a21b76612d77176a8054b41277135684 (patch)
tree1394839e9425a9f670cffcef8d4c2fdee3359412 /doc/src
parente9500240661c03750923e6f539bfa2d75cfaa32a (diff)
extstats: change output functions to emit valid JSON
Manipulating extended statistics is more convenient as JSON than the current ad-hoc format, so let's change before it's too late. Discussion: https://postgr.es/m/20170420193828.k3fliiock5hdnehn@alvherre.pgsql
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/perform.sgml11
1 files changed, 5 insertions, 6 deletions
diff --git a/doc/src/sgml/perform.sgml b/doc/src/sgml/perform.sgml
index a8bebb14363..b10b734b901 100644
--- a/doc/src/sgml/perform.sgml
+++ b/doc/src/sgml/perform.sgml
@@ -1138,9 +1138,9 @@ ANALYZE zipcodes;
SELECT stxname, stxkeys, stxdependencies
FROM pg_statistic_ext
WHERE stxname = 'stts';
- stxname | stxkeys | stxdependencies
----------+---------+--------------------------------------------
- stts | 1 5 | [{1 => 5 : 1.000000}, {5 => 1 : 0.423130}]
+ stxname | stxkeys | stxdependencies
+---------+---------+------------------------------------------
+ stts | 1 5 | {"1 => 5": 1.000000, "5 => 1": 0.423130}
(1 row)
</programlisting>
where it can be seen that column 1 (a zip code) fully determines column
@@ -1225,10 +1225,9 @@ ANALYZE zipcodes;
SELECT stxkeys AS k, stxndistinct AS nd
FROM pg_statistic_ext
WHERE stxname = 'stts2';
--[ RECORD 1 ]---------------------------------------------
+-[ RECORD 1 ]--------------------------------------------------------
k | 1 2 5
-nd | [{(b 1 2), 33178.000000}, {(b 1 5), 33178.000000},
- {(b 2 5), 27435.000000}, {(b 1 2 5), 33178.000000}]
+nd | {"1, 2": 33178, "1, 5": 33178, "2, 5": 27435, "1, 2, 5": 33178}
(1 row)
</programlisting>
which indicates that there are three combinations of columns that