Re: [PERFORM] optimizing immutable vs. stable function calls? - Mailing list pgsql-performance

From Tom Lane
Subject Re: [PERFORM] optimizing immutable vs. stable function calls?
Date
Msg-id 16252.1484781941@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PERFORM] optimizing immutable vs. stable function calls?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PERFORM] optimizing immutable vs. stable function calls?  (Karl Czajkowski <karlcz@isi.edu>)
List pgsql-performance
Karl Czajkowski <karlcz@isi.edu> writes:
> Is there a correctness hazard with pretending our function is
> IMMUTABLE, even though we will change the underlying config parameter
> in the same connection?

You could probably get away with that if you never ever use prepared
queries (beware that almost anything in plpgsql is a prepared query).
It's a trick that's likely to bite you eventually though.

            regards, tom lane


pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PERFORM] optimizing immutable vs. stable function calls?
Next
From: "David G. Johnston"
Date:
Subject: Re: [PERFORM] optimizing immutable vs. stable function calls?