Re: Why *exactly* is date_trunc() not immutable ?

From: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Why *exactly* is date_trunc() not immutable ?
Date: 2007-02-19 09:36:36
Message-ID: 20070219093636.GH4072@merkur.hilbert.loc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Feb 19, 2007 at 10:16:12AM +0100, Alban Hertroys wrote:

> What I'm trying to say is not that it _is_ immutable, but that it
> _behaves_ immutable (under said conditions).
>
> This could imply that if a certain condition is available in a query on
> which such a function operates, it would behave immutable.
That is precisely why I didn't get the idea upfront that
date_trunc() wouldn't be immutable just so.

I'll solve it with a date_trunc_utc() wrapper.

Thanks to all who chipped in. Something new to learn every day.

Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2007-02-19 09:58:50 Re: Why *exactly* is date_trunc() not immutable ?
Previous Message Alban Hertroys 2007-02-19 09:16:12 Re: Why *exactly* is date_trunc() not immutable ?