diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-03-23 05:14:37 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-03-23 05:14:37 +0000 |
| commit | 8d9e025e7fcc68737d5a0e99b457417ed595af46 (patch) | |
| tree | feca4424957b7784e94428b5ed938454a4c71fdf /src/include | |
| parent | efeffae2457c69802eed7e4c45c1c3c97528a6fe (diff) | |
| download | postgresql-8d9e025e7fcc68737d5a0e99b457417ed595af46.tar.gz | |
Instead of storing pg_statistic stavalues entries as text strings, store
them as arrays of the internal datatype. This requires treating the
stavalues columns as 'anyarray' rather than 'text[]', which is not 100%
kosher but seems to work fine for the purposes we need for pg_statistic.
Perhaps in the future 'anyarray' will be allowed more generally.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/catalog/catversion.h | 4 | ||||
| -rw-r--r-- | src/include/catalog/pg_statistic.h | 22 |
2 files changed, 16 insertions, 10 deletions
diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h index 1bbd5f6636..a551518106 100644 --- a/src/include/catalog/catversion.h +++ b/src/include/catalog/catversion.h @@ -37,7 +37,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: catversion.h,v 1.182 2003/03/21 01:58:04 tgl Exp $ + * $Id: catversion.h,v 1.183 2003/03/23 05:14:37 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -53,6 +53,6 @@ */ /* yyyymmddN */ -#define CATALOG_VERSION_NO 200303201 +#define CATALOG_VERSION_NO 200303221 #endif diff --git a/src/include/catalog/pg_statistic.h b/src/include/catalog/pg_statistic.h index 8c8806a159..c72c68265d 100644 --- a/src/include/catalog/pg_statistic.h +++ b/src/include/catalog/pg_statistic.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: pg_statistic.h,v 1.19 2003/03/10 22:28:21 tgl Exp $ + * $Id: pg_statistic.h,v 1.20 2003/03/23 05:14:37 tgl Exp $ * * NOTES * the genbki.sh script reads this file and generates .bki @@ -26,6 +26,12 @@ * ---------------- */ +/* + * Keep C compiler happy with anyarray, below. This will need to go elsewhere + * if we ever use anyarray for more than pg_statistic. + */ +typedef struct varlena anyarray; + /* ---------------- * pg_statistic definition. cpp turns this into * typedef struct FormData_pg_statistic @@ -109,14 +115,14 @@ CATALOG(pg_statistic) BKI_WITHOUT_OIDS float4 stanumbers4[1]; /* - * Values in these text arrays are external representations of values - * of the column's data type. To re-create the actual Datum, do - * datatypein(textout(arrayelement)). + * Values in these arrays are values of the column's data type. We + * presently have to cheat quite a bit to allow polymorphic arrays + * of this kind, but perhaps someday it'll be a less bogus facility. */ - text stavalues1[1]; - text stavalues2[1]; - text stavalues3[1]; - text stavalues4[1]; + anyarray stavalues1; + anyarray stavalues2; + anyarray stavalues3; + anyarray stavalues4; } FormData_pg_statistic; #define STATISTIC_NUM_SLOTS 4 |
