Fix for returning stack pointer from selectivity, from Bernard Frankpitt.
This commit is contained in:
parent
f962514403
commit
d5db88142c
@ -12,7 +12,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.23 1998/09/01 04:32:50 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.24 1999/02/05 17:47:29 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -390,18 +390,16 @@ btreesel(Oid operatorObjectId,
|
|||||||
Oid indexrelid)
|
Oid indexrelid)
|
||||||
{
|
{
|
||||||
float64 result;
|
float64 result;
|
||||||
float64data resultData;
|
|
||||||
|
|
||||||
if (FunctionalSelectivity(nIndexKeys, attributeNumber))
|
if (FunctionalSelectivity(nIndexKeys, attributeNumber))
|
||||||
{
|
{
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Need to call the functions selectivity function here. For now
|
* Need to call the functions selectivity function here. For now
|
||||||
* simply assume it's 1/3 since functions don't currently have
|
* simply assume it's 1/3 since functions don't currently have
|
||||||
* selectivity functions
|
* selectivity functions
|
||||||
*/
|
*/
|
||||||
resultData = 1.0 / 3.0;
|
result = (float64) palloc(sizeof(float64data));
|
||||||
result = &resultData;
|
*result = 1.0 / 3.0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user