Re: function calls in WHERE clause - Mailing list pgsql-general

From Tom Lane
Subject Re: function calls in WHERE clause
Date
Msg-id 24249.1094679732@sss.pgh.pa.us
Whole thread Raw
In response to function calls in WHERE clause  ("Lee Harr" <missive@hotmail.com>)
List pgsql-general
"Lee Harr" <missive@hotmail.com> writes:
> I should note that this_program() is defined as VOLATILE.

So don't do that ;-)

> It was a while ago, but I believe this is because I have
> a this_program() defined in each schema and they
> return a different value depending on which schema
> you are in when you call the function...

But each one of these is individually immutable, no?  If it's not,
how are you expecting your query-builder function to give the same
answers as before?

            regards, tom lane

pgsql-general by date:

Previous
From: "Lee Harr"
Date:
Subject: function calls in WHERE clause
Next
From: Wes
Date:
Subject: Re: How to determine a database is intact?