From: Tom Lane <tgl@sss.pgh.pa.us>
To: Karl Czajkowski <karlcz@isi.edu>
Cc: pgsql-performance@postgresql.org
Subject: Re: optimizing immutable vs. stable function calls?
Date: Wed, 18 Jan 2017 18:25:41 -0500
Message-ID: <16252.1484781941@sss.pgh.pa.us> (raw)
In-Reply-To: <20170118230646.GD23081@moraine.isi.edu>
References: <20170118223633.GC23081@moraine.isi.edu>
<14964.1484780049@sss.pgh.pa.us>
<20170118230646.GD23081@moraine.isi.edu>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, karlcz@isi.edu
Subject: Re: optimizing immutable vs. stable function calls?
In-Reply-To: <16252.1484781941@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox