On Tue, Jan 27, 2026 at 11:14:12AM -0500, Corey Huinker wrote:
>> 0001 - adds a test left out of dependencies

Applied this one now, you are right that it should have been added in
302879bd68d1, so my mistake I guess.

> Before I forget, one thing that I did find notable is that the
> mcv/expressions type importing code bypasses statatt_get_type() now, which
> means that there is only one caller for this function, and it could be
> moved back to being static.

Indeed, I can see that.  I don't feel a strong need in moving it back
to statatt_get_type(), HEAD or the previous states feel fine to me
either way.

> Furthermore statatt_get_type() only exists because the two varietals of
> examine_attribute() are just slightly off what we need - the one in
> analyze.c will skip attributes with a target set to 0, and the one in
> extended_stats.c only handles expressions. So there might be some
> consolidation possible, but we'd have to change the code already being run
> for regular ANALYZE and up til now that's been something I haven't wanted
> to do.

The second flavor of examine_attribute() for extended stats is an
older artifact of v14, while get_attr_stat_type() (aka
statatt_get_type() on HEAD) is new to v18.  More consolidation of all
this code seems like it could be an interesting move with the
long-term picture in mind.  The code added to extended_stats.c in v14
is clearly a simplified copy-paste of what existed in analyze.c.  I
don't see a strong need to do that on this thread for the moment,
let's first focus on finishing this project :)
--
Michael

Attachment: signature.asc
Description: PGP signature

Reply via email to