*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.43 1999/11/25 00:15:57 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.44 1999/11/25 00:21:34 momjian Exp $
*
*-------------------------------------------------------------------------
*/
bool *typbyval,
int32 *typmod);
static bool getattstatistics(Oid relid, AttrNumber attnum,
- Oid typid, int32 typmod,
+ Oid opid, Oid typid, int32 typmod,
double *nullfrac,
double *commonfrac,
Datum *commonval,
&typid, &typlen, &typbyval, &typmod);
/* get stats for the attribute, if available */
- if (getattstatistics(relid, attno, typid, typmod,
+ if (getattstatistics(relid, attno, opid, typid, typmod,
&nullfrac, &commonfrac, &commonval,
NULL, NULL))
{
getattproperties(relid, attno,
&typid, &typlen, &typbyval, &typmod);
- if (! getattstatistics(relid, attno, typid, typmod,
+ if (! getattstatistics(relid, attno, opid, typid, typmod,
NULL, NULL, NULL,
&loval, &hival))
{
* is no index nor syscache for pg_statistic. FIX THIS!
*/
static bool
-getattstatistics(Oid relid, AttrNumber attnum, Oid typid, int32 typmod,
+getattstatistics(Oid relid, AttrNumber attnum, Oid opid, Oid typid,
+ int32 typmod,
double *nullfrac,
double *commonfrac,
Datum *commonval,
tuple = SearchSysCacheTuple(STATRELID,
ObjectIdGetDatum(relid),
Int16GetDatum((int16) attnum),
- 0, 0); /* staop is currently 0 */
+ opid, 0);
if (!HeapTupleIsValid(tuple))
{
/* no such stats entry */