提交 d5db8814 编写于 作者: B Bruce Momjian

Fix for returning stack pointer from selectivity, from Bernard Frankpitt.

上级 f9625144
...@@ -12,7 +12,7 @@ ...@@ -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, ...@@ -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
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册