Re: extended stats on partitioned tables
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tomas Vondra <tomas.vondra@enterprisedb.com>
Cc: Zhihong Yu <zyu@yugabyte.com>, Justin Pryzby <pryzby@telsasoft.com>,
Jaime Casanova <jcasanov@systemguards.com.ec>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2021-12-12T18:27:22Z
Lists: pgsql-hackers
Tomas Vondra <tomas.vondra@enterprisedb.com> writes: > On 12/12/21 16:37, Zhihong Yu wrote: >> Since the rte (RangeTblEntry*) doesn't seem to be used beyond checking >> inh, I think it would be better if the above style of checking is used >> throughout the patch (without introducing rte variable). > It's mostly a matter of personal taste, but I always found this style of > condition (i.e. dereferencing a pointer returned by a function) much > less readable. It's hard to parse what exactly is happening, what struct > type are we dealing with, etc. YMMV but the separate variable makes it > much clearer for me. And I'd expect the compilers to produce pretty much > the same code too for those cases. FWIW, I agree. Also, it's possible that future patches would create a need to touch the RTE again nearby, in which case having the variable makes it easier to write non-crummy code for that. regards, tom lane
Commits
-
Add stxdinherit flag to pg_statistic_ext_data
- 269b532aef55 15.0 landed
-
Build inherited extended stats on partitioned tables
- d6817032d26b 13.6 landed
- 20b9fa308ebf 15.0 landed
- ea212bd95fd2 14.2 landed
- 9d1bcf5dc11a 12.10 landed
- 491182e52909 11.15 landed
- 9211c2e38f09 10.20 landed
-
Ignore extended statistics for inheritance trees
- 76569ad6f423 12.10 landed
- ff0e7c7e8401 10.20 landed
- b3cac25f4d50 11.15 landed
- acfde7c5837d 13.6 landed
- 2cc007fd0359 14.2 landed
- 36c4bc6e725f 15.0 landed
-
Don't build extended statistics on inheritance trees
- 859b3003de87 10.10 cited
-
Tighten up relation kind checks for extended statistics
- 8c5cdb7f4f6e 10.0 cited
-
Avoid assuming that statistics for a parent relation reflect the properties of
- 427c6b5b9849 8.2.0 cited