From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Neil Conway <neilc(at)samurai(dot)com>, John Gray <jgray(at)azuli(dot)co(dot)uk>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Minor point about contrib/xml2 functions "IMMUTABLE" marking |
Date: | 2005-10-13 15:57:56 |
Message-ID: | 200510131557.j9DFvun03738@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Neil Conway wrote:
> >> If a function's return value for a particular set of arguments could
> >> change within a single table scan, the function is volatile -- ISTM
> >> xslt_process() clearly falls within that definition.
>
> > My thought was that a web page lookup is going to be a very expensive
> > operation, so you would not want it to requery inside a transaction.
>
> > It is not like random() where you want it to be re-called and it is
> > inexpensive.
>
> "It's too expensive" is not a valid rationale for claiming that
> something is stable when it is not. In any case, you have fallen into
> the all too common trap of supposing that these labels have something
> to do with caching function results. Calling it stable is not going
> to improve performance, only create a risk of wrong answers.
Well, should be marked as VOLATILE? A web lookup?
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-10-13 16:03:46 | Re: Minor point about contrib/xml2 functions "IMMUTABLE" marking |
Previous Message | Bruce Momjian | 2005-10-13 15:50:22 | Re: [HACKERS] Darwin compile fixes |