BUG #2150: PL/Python function delcared STABLE gets run repeatedly - Mailing list pgsql-bugs

From Aaron Swartz
Subject BUG #2150: PL/Python function delcared STABLE gets run repeatedly
Date
Msg-id 20060105182627.E0321F0A32@svr2.postgresql.org
Whole thread Raw
Responses Re: BUG #2150: PL/Python function delcared STABLE gets run repeatedly
List pgsql-bugs
The following bug has been logged online:

Bug reference:      2150
Logged by:          Aaron Swartz
Email address:      me@aaronsw.com
PostgreSQL version: 8.1.1
Operating system:   Mac OS X
Description:        PL/Python function delcared STABLE gets run repeatedly
Details:

We have the PL/Python function get_foo(n) that returns an array. If this
function is declared IMMUTABLE, then:

SELECT * FROM tablenamehere WHERE id = any(get_foo(21));

returns quickly. If the function is declared STABLE, however, PostgreSQL
seems to incorrectly run it for every row in the table and it takes forever.

pgsql-bugs by date:

Previous
From: "Glauco Carlos Silva"
Date:
Subject: BUG #2154: conversion problem
Next
From: "Abigail Corrigan"
Date:
Subject: BUG #2149: can not enter µM into a varchar field in version 8.1.1