Take pg_attribute out of VacAttrStats
Peter Eisentraut <peter@eisentraut.org>
Take pg_attribute out of VacAttrStats The VacAttrStats structure contained the whole Form_pg_attribute for a column, but it actually only needs attstattarget from there. So remove the Form_pg_attribute field and make a separate field for attstattarget. This simplifies some code for extended statistics that doesn't deal with a column but an expression, which had to fake up pg_attribute rows to satisfy internal APIs. Also, we can remove some comments that essentially said "don't look at pg_attribute directly". Reviewed-by: Tomas Vondra <tomas.vondra@enterprisedb.com> Discussion: https://www.postgresql.org/message-id/flat/d6069765-5971-04d3-c10d-e4f7b2e9c459%40eisentraut.org
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/analyze.c | modified | +14 −19 |
| src/backend/statistics/extended_stats.c | modified | +12 −36 |
| src/backend/tsearch/ts_typanalyze.c | modified | +4 −6 |
| src/backend/utils/adt/array_typanalyze.c | modified | +2 −2 |
| src/backend/utils/adt/rangetypes_typanalyze.c | modified | +7 −9 |
| src/include/commands/vacuum.h | modified | +4 −8 |
Discussion
- several attstattarget-related improvements 4 messages · 2023-06-28 → 2023-07-03