Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d5db881

Browse files
committed
Fix for returning stack pointer from selectivity, from Bernard Frankpitt.
1 parent f962514 commit d5db881

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/backend/utils/adt/selfuncs.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*
1313
*
1414
* IDENTIFICATION
15-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.23 1998/09/01 04:32:50 momjian Exp $
15+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.24 1999/02/05 17:47:29 momjian Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -390,18 +390,16 @@ btreesel(Oid operatorObjectId,
390390
Oid indexrelid)
391391
{
392392
float64 result;
393-
float64data resultData;
394393

395394
if (FunctionalSelectivity(nIndexKeys, attributeNumber))
396395
{
397-
398396
/*
399397
* Need to call the functions selectivity function here. For now
400398
* simply assume it's 1/3 since functions don't currently have
401399
* selectivity functions
402400
*/
403-
resultData = 1.0 / 3.0;
404-
result = &resultData;
401+
result = (float64) palloc(sizeof(float64data));
402+
*result = 1.0 / 3.0;
405403
}
406404
else
407405
{

0 commit comments

Comments
 (0)