Re: optimizing immutable vs. stable function calls?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Karl Czajkowski <karlcz(at)isi(dot)edu>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: optimizing immutable vs. stable function calls?
Date: 2017-01-18 23:25:41
Message-ID: 16252.1484781941@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Karl Czajkowski <karlcz(at)isi(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message David G. Johnston 2017-01-19 00:09:20 Re: optimizing immutable vs. stable function calls?
Previous Message Tom Lane 2017-01-18 23:23:26 Re: optimizing immutable vs. stable function calls?