several attstattarget-related improvements

Peter Eisentraut <peter@eisentraut.org>

From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-06-28T14:52:27Z
Lists: pgsql-hackers

Attachments

Here are a few patches related to attstattarget:

- 0001: Change type of pg_statistic_ext.stxstattarget, to match 
attstattarget.  Maybe this should go into PG16, for consistency?

- 0002: Add macro for maximum statistics target, instead of hardcoding 
it everywhere.

- 0003: Take pg_attribute out of VacAttrStats.  This simplifies some 
code, especially for extended statistics, which had to have weird 
workarounds.

Commits

  1. Add macro for maximum statistics target

  2. Change type of pg_statistic_ext.stxstattarget

  3. Take pg_attribute out of VacAttrStats