On Tue, Oct 30, 2018 at 09:24:01PM +0900, Amit Langote wrote:
>> It is based on Mathias's patch. Although we can use
>> pg_partition_tree on PostgreSQL, we still should to support
>> PostgreSQL 10, 11 where this function is not available 
> 
> Ah, I forgot that psql will need to consider 10 and 11 servers too.

+    /* PostgreSQL 11 has pg_partition_tree function */
That's v12 here.

+    appendPQExpBuffer(&buf,
+    ",\n  (SELECT pg_catalog.pg_size_pretty(sum(pg_catalog.pg_table_size("
+    "relid)))\n"
+    "     FROM pg_partition_tree(c.oid)) AS \"%s\""
You need to do schema qualification for functions and relations.
--
Michael

Attachment: signature.asc
Description: PGP signature

Reply via email to