10
10
*
11
11
*
12
12
* IDENTIFICATION
13
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.43 1999/11/25 00:15:57 momjian Exp $
13
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.44 1999/11/25 00:21:34 momjian Exp $
14
14
*
15
15
*-------------------------------------------------------------------------
16
16
*/
@@ -47,7 +47,7 @@ static void getattproperties(Oid relid, AttrNumber attnum,
47
47
bool * typbyval ,
48
48
int32 * typmod );
49
49
static bool getattstatistics (Oid relid , AttrNumber attnum ,
50
- Oid typid , int32 typmod ,
50
+ Oid opid , Oid typid , int32 typmod ,
51
51
double * nullfrac ,
52
52
double * commonfrac ,
53
53
Datum * commonval ,
@@ -92,7 +92,7 @@ eqsel(Oid opid,
92
92
& typid , & typlen , & typbyval , & typmod );
93
93
94
94
/* get stats for the attribute, if available */
95
- if (getattstatistics (relid , attno , typid , typmod ,
95
+ if (getattstatistics (relid , attno , opid , typid , typmod ,
96
96
& nullfrac , & commonfrac , & commonval ,
97
97
NULL , NULL ))
98
98
{
@@ -268,7 +268,7 @@ intltsel(Oid opid,
268
268
getattproperties (relid , attno ,
269
269
& typid , & typlen , & typbyval , & typmod );
270
270
271
- if (! getattstatistics (relid , attno , typid , typmod ,
271
+ if (! getattstatistics (relid , attno , opid , typid , typmod ,
272
272
NULL , NULL , NULL ,
273
273
& loval , & hival ))
274
274
{
@@ -580,7 +580,8 @@ getattproperties(Oid relid, AttrNumber attnum,
580
580
* is no index nor syscache for pg_statistic. FIX THIS!
581
581
*/
582
582
static bool
583
- getattstatistics (Oid relid , AttrNumber attnum , Oid typid , int32 typmod ,
583
+ getattstatistics (Oid relid , AttrNumber attnum , Oid opid , Oid typid ,
584
+ int32 typmod ,
584
585
double * nullfrac ,
585
586
double * commonfrac ,
586
587
Datum * commonval ,
@@ -598,7 +599,7 @@ getattstatistics(Oid relid, AttrNumber attnum, Oid typid, int32 typmod,
598
599
tuple = SearchSysCacheTuple (STATRELID ,
599
600
ObjectIdGetDatum (relid ),
600
601
Int16GetDatum ((int16 ) attnum ),
601
- 0 , 0 ); /* staop is currently 0 */
602
+ opid , 0 );
602
603
if (!HeapTupleIsValid (tuple ))
603
604
{
604
605
/* no such stats entry */
0 commit comments