diff --git a/src/backend/access/common/tupdesc.c b/src/backend/access/common/tupdesc.c index e9bc2df684ab26eff2a58a90fba7b9ca3a76f45f..a8671f94327222e0626e3b625b20bab25a6c838c 100644 --- a/src/backend/access/common/tupdesc.c +++ b/src/backend/access/common/tupdesc.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.15 1997/08/21 01:31:24 vadim Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.16 1997/08/21 03:01:15 momjian Exp $ * * NOTES * some of the executor utility code such as "ExecTypeFromTL" should be @@ -179,7 +179,7 @@ TupleDescInitEntry(TupleDesc desc, memset(att->attname.data,0,NAMEDATALEN); - att->attnvals = 0; /* dummy value */ + att->attdisbursion = 0; /* dummy value */ att->attcacheoff = -1; att->attnum = attributeNumber; diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c index ef6773c0c812f16fa38b9fc02dbc713befbed31a..989114be8de71583e096927bac052746d1cf104b 100644 --- a/src/backend/catalog/heap.c +++ b/src/backend/catalog/heap.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.19 1997/08/21 02:27:53 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.20 1997/08/21 03:01:21 momjian Exp $ * * INTERFACE ROUTINES * heap_creatr() - Create an uncataloged heap relation @@ -374,7 +374,7 @@ heap_creatr(char *name, * work? Is it automatic now? Expects the caller to have * attname, atttypid, atttyparg, attproc, and attlen domains filled. * Create fills the attnum domains sequentually from zero, - * fills the attnvals domains with zeros, and fills the + * fills the attdisbursion domains with zeros, and fills the * attrelid fields with the relid. * * scan relation catalog for name conflict @@ -571,7 +571,7 @@ AddNewAttributeTuples(Oid new_rel_oid, dpp = tupdesc->attrs; for (i = 0; i < natts; i++) { (*dpp)->attrelid = new_rel_oid; - (*dpp)->attnvals = 0; + (*dpp)->attdisbursion = 0; tup = heap_addheader(Natts_pg_attribute, ATTRIBUTE_TUPLE_SIZE, @@ -592,7 +592,7 @@ AddNewAttributeTuples(Oid new_rel_oid, dpp = HeapAtt; for (i = 0; i < -1 - FirstLowInvalidHeapAttributeNumber; i++) { (*dpp)->attrelid = new_rel_oid; - /* (*dpp)->attnvals = 0; unneeded */ + /* (*dpp)->attdisbursion = 0; unneeded */ tup = heap_addheader(Natts_pg_attribute, ATTRIBUTE_TUPLE_SIZE, diff --git a/src/backend/commands/command.c b/src/backend/commands/command.c index f207ffb07fc4f0964fb5033a39f218c17d37d0b8..cf8b136bd0600d06bacd428f48d475d62163858c 100644 --- a/src/backend/commands/command.c +++ b/src/backend/commands/command.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.11 1997/08/21 01:32:19 vadim Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.12 1997/08/21 03:01:27 momjian Exp $ * * NOTES * The PortalExecutorHeapMemory crap needs to be eliminated @@ -382,7 +382,7 @@ PerformAddAttribute(char *relationName, (Datum) NULL); attributeD.attrelid = reltup->t_oid; - attributeD.attnvals = 0; /* XXX temporary */ + attributeD.attdisbursion = 0; /* XXX temporary */ attributeD.attcacheoff = -1; attributeTuple = heap_addheader(Natts_pg_attribute, diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c index 7ecad57cbaf5aaff4826e5e0db366aed469d0f69..b4598a4e7b951167f784ebc1366d8bf6161b914f 100644 --- a/src/backend/commands/vacuum.c +++ b/src/backend/commands/vacuum.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.40 1997/08/21 02:27:58 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.41 1997/08/21 03:01:36 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -1814,7 +1814,7 @@ vc_updstats(Oid relid, int npages, int ntups, bool hasindex, VRelStats *vacrelst } if (selratio > 1.0) selratio = 1.0; - attp->attnvals = selratio; + attp->attdisbursion = selratio; WriteNoReleaseBuffer(abuf); /* DO PG_STATISTIC INSERTS */ diff --git a/src/backend/executor/execUtils.c b/src/backend/executor/execUtils.c index e51a52d385759153692888409ba35d9f28c2d9b9..20f8a3336cc3e68031a7c078463ef556d038ff0f 100644 --- a/src/backend/executor/execUtils.c +++ b/src/backend/executor/execUtils.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.12 1997/08/20 14:53:20 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.13 1997/08/21 03:01:42 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -507,7 +507,7 @@ ExecSetTypeInfo(int index, att->atttypid = typeID; att->attdefrel = 0; /* dummy value */ - att->attnvals = 0; /* dummy value */ + att->attdisbursion = 0; /* dummy value */ att->atttyparg = 0; /* dummy value */ att->attlen = attLen; att->attnum = attNum; diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c index d8caa5a4776439216482c50bb82f8b074d8d9f15..fe90feda72d7b5337fb55342aad7d8a32443e35b 100644 --- a/src/backend/utils/adt/selfuncs.c +++ b/src/backend/utils/adt/selfuncs.c @@ -12,7 +12,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.7 1997/08/21 02:28:34 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.8 1997/08/21 03:02:04 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -41,7 +41,7 @@ */ #define FunctionalSelectivity(nIndKeys,attNum) (attNum==InvalidAttrNumber) -static float32data getattnvals(Oid relid, AttrNumber attnum); +static float32data getattdisbursion(Oid relid, AttrNumber attnum); static void gethilokey(Oid relid, AttrNumber attnum, Oid opid, char **high, char **low); @@ -62,7 +62,7 @@ eqsel(Oid opid, if (NONVALUE(attno) || NONVALUE(relid)) *result = 0.1; else - *result = (float64data)getattnvals(relid, (int) attno); + *result = (float64data)getattdisbursion(relid, (int) attno); return(result); } @@ -114,7 +114,7 @@ intltsel(Oid opid, if ((flag & SEL_RIGHT && val < low) || (!(flag & SEL_RIGHT) && val > high)) { float32data nvals; - nvals = getattnvals(relid, (int) attno); + nvals = getattdisbursion(relid, (int) attno); if (nvals == 0) *result = 1.0 / 3.0; else { @@ -182,8 +182,8 @@ eqjoinsel(Oid opid, NONVALUE(attno2) || NONVALUE(relid2)) *result = 0.1; else { - num1 = getattnvals(relid1, (int) attno1); - num2 = getattnvals(relid2, (int) attno2); + num1 = getattdisbursion(relid1, (int) attno1); + num2 = getattdisbursion(relid2, (int) attno2); max = (num1 > num2) ? num1 : num2; if (max == 0) *result = 1.0; @@ -245,10 +245,10 @@ intgtjoinsel(Oid opid, } /* - * getattnvals - Retrieves the number of values within an attribute. + * getattdisbursion - Retrieves the number of values within an attribute. * * Note: - * getattnvals and gethilokey both currently use keyed + * getattdisbursion and gethilokey both currently use keyed * relation scans and amgetattr. Alternatively, * the relation scan could be non-keyed and the tuple * returned could be cast (struct X *) tuple + tuple->t_hoff. @@ -259,7 +259,7 @@ intgtjoinsel(Oid opid, * for gethilokey which accesses stahikey in struct statistic. */ static float32data -getattnvals(Oid relid, AttrNumber attnum) +getattdisbursion(Oid relid, AttrNumber attnum) { HeapTuple atp; float32data nvals; @@ -270,11 +270,11 @@ getattnvals(Oid relid, AttrNumber attnum) Int16GetDatum(attnum), 0,0); if (!HeapTupleIsValid(atp)) { - elog(WARN, "getattnvals: no attribute tuple %d %d", + elog(WARN, "getattdisbursion: no attribute tuple %d %d", relid, attnum); return(0); } - nvals = ((AttributeTupleForm ) GETSTRUCT(atp))->attnvals; + nvals = ((AttributeTupleForm ) GETSTRUCT(atp))->attdisbursion; if (nvals > 0) return(nvals); atp = SearchSysCacheTuple(RELOID, ObjectIdGetDatum(relid), @@ -283,7 +283,7 @@ getattnvals(Oid relid, AttrNumber attnum) just for now, in case number of distinctive values is not cached */ if (!HeapTupleIsValid(atp)) { - elog(WARN, "getattnvals: no relation tuple %d", relid); + elog(WARN, "getattdisbursion: no relation tuple %d", relid); return(0); } ntuples = ((Form_pg_class) GETSTRUCT(atp))->reltuples; diff --git a/src/include/catalog/pg_attribute.h b/src/include/catalog/pg_attribute.h index da28d2b7055e42a3d6cc74bfd891810400a8900d..c7192c99782e07ae1ee14a31343f7f694458fecd 100644 --- a/src/include/catalog/pg_attribute.h +++ b/src/include/catalog/pg_attribute.h @@ -7,7 +7,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_attribute.h,v 1.10 1997/08/21 02:28:52 momjian Exp $ + * $Id: pg_attribute.h,v 1.11 1997/08/21 03:02:13 momjian Exp $ * * NOTES * the genbki.sh script reads this file and generates .bki @@ -48,7 +48,7 @@ CATALOG(pg_attribute) BOOTSTRAP { attributes of this instance, so they had better match or Postgres will fail. */ - float4 attnvals; + float4 attdisbursion; int2 attlen; /* attlen is a copy of the typlen field from pg_type for this attribute. See atttypid above. See struct TypeTupleFormData for @@ -118,7 +118,7 @@ typedef FormData_pg_attribute *AttributeTupleForm; #define Anum_pg_attribute_attname 2 #define Anum_pg_attribute_atttypid 3 -#define Anum_pg_attribute_attnvals 4 +#define Anum_pg_attribute_attdisbursion 4 #define Anum_pg_attribute_attlen 5 #define Anum_pg_attribute_attnum 6 @@ -362,7 +362,7 @@ DATA(insert OID = 0 ( 1261 vtype 18 0 1 -11 0 -1 t f c f f)); { 1249l, {"attrelid"}, 26l, 0l, 4, 1, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ { 1249l, {"attname"}, 19l, 0l, NAMEDATALEN, 2, 0l, -1l, '\0', '\0', 'i', '\0', '\0' }, \ { 1249l, {"atttypid"}, 26l, 0l, 4, 3, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ -{ 1249l, {"attnvals"}, 700l, 0l, 4, 4, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ +{ 1249l, {"attdisbursion"}, 700l, 0l, 4, 4, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ { 1249l, {"attlen"}, 21l, 0l, 2, 5, 0l, -1l, '\001', '\0', 's', '\0', '\0' }, \ { 1249l, {"attnum"}, 21l, 0l, 2, 6, 0l, -1l, '\001', '\0', 's', '\0', '\0' }, \ { 1249l, {"attnelems"}, 23l, 0l, 4, 7, 0l, -1l, '\001', '\0', 'i', '\0', '\0' }, \ @@ -376,7 +376,7 @@ DATA(insert OID = 0 ( 1261 vtype 18 0 1 -11 0 -1 t f c f f)); DATA(insert OID = 0 ( 1249 attrelid 26 0 4 1 0 -1 t f i f f)); DATA(insert OID = 0 ( 1249 attname 19 0 NAMEDATALEN 2 0 -1 f f i f f)); DATA(insert OID = 0 ( 1249 atttypid 26 0 4 3 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1249 attnvals 700 0 4 4 0 -1 t f i f f)); +DATA(insert OID = 0 ( 1249 attdisbursion 700 0 4 4 0 -1 t f i f f)); DATA(insert OID = 0 ( 1249 attlen 21 0 2 5 0 -1 t f s f f)); DATA(insert OID = 0 ( 1249 attnum 21 0 2 6 0 -1 t f s f f)); DATA(insert OID = 0 ( 1249 attnelems 23 0 4 7 0 -1 t f i f f));