Re: [GENERAL] Why extract( ... from timestamp ) is not immutable?

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: depesz(at)depesz(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [GENERAL] Why extract( ... from timestamp ) is not immutable?
Date: 2012-01-31 03:07:52
Message-ID: 4F275B08.4010503@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On 1/30/12 5:41 PM, Tom Lane wrote:
> hubert depesz lubaczewski <depesz(at)depesz(dot)com> writes:
>> On Mon, Jan 30, 2012 at 10:35:21AM -0800, Josh Berkus wrote:
>>> We can't have functions which are immutable or not depending on their
>>> inputs. That way lies madness.
>
>> but this is exactly what's happening now.
>
> Well, the current marking is clearly incorrect. What to do about that
> is a bit less clear --- should we downgrade the marking, or change the
> function's behavior so that it really is immutable?

AFAIK, the only case which is NOT immutable is extract(epoch FROM
timestamp without time zone), no?

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Nick 2012-01-31 03:55:33 Help speeding up a left join aggregate
Previous Message Tom Lane 2012-01-31 02:49:29 Re: list blocking queries

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2012-01-31 03:56:47 Re: Confusing EXPLAIN output in case of inherited tables
Previous Message Kyotaro HORIGUCHI 2012-01-31 02:59:31 Re: Speed dblink using alternate libpq tuple storage