Re: Why *exactly* is date_trunc() not immutable ? - Mailing list pgsql-general

From Karsten Hilbert
Subject Re: Why *exactly* is date_trunc() not immutable ?
Date
Msg-id 20070219093636.GH4072@merkur.hilbert.loc
Whole thread Raw
In response to Re: Why *exactly* is date_trunc() not immutable ?  (Alban Hertroys <alban@magproductions.nl>)
Responses Re: Why *exactly* is date_trunc() not immutable ?  (Martijn van Oosterhout <kleptog@svana.org>)
List 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

pgsql-general by date:

Previous
From: Andrew Kelly
Date:
Subject: Re: open source - content management system - that uses PostGreSQL
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Why *exactly* is date_trunc() not immutable ?