1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-21 10:42:50 +03:00

Extend VacAttrStats to allow typanalyze functions to store statistic values

of different types than the underlying column. The capability isn't yet
used for anything, but will be required by upcoming patch to analyze
tsvector columns.

Jan Urbanski
This commit is contained in:
Heikki Linnakangas
2008-07-01 10:33:09 +00:00
parent baaad2330b
commit 3ccb2c590c
2 changed files with 45 additions and 6 deletions

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/commands/vacuum.h,v 1.78 2008/06/19 00:46:06 alvherre Exp $
* $PostgreSQL: pgsql/src/include/commands/vacuum.h,v 1.79 2008/07/01 10:33:09 heikki Exp $
*
*-------------------------------------------------------------------------
*/
@@ -93,6 +93,18 @@ typedef struct VacAttrStats
int numvalues[STATISTIC_NUM_SLOTS];
Datum *stavalues[STATISTIC_NUM_SLOTS];
/*
* These fields describe the stavalues[n] element types. They will
* be initialized to be the same as the column's that's underlying the
* slot, but a custom typanalyze function might want to store an array of
* something other than the analyzed column's elements. It should then
* overwrite these fields.
*/
Oid statypid[STATISTIC_NUM_SLOTS];
int2 statyplen[STATISTIC_NUM_SLOTS];
bool statypbyval[STATISTIC_NUM_SLOTS];
char statypalign[STATISTIC_NUM_SLOTS];
/*
* These fields are private to the main ANALYZE code and should not be
* looked at by type-specific functions.