| From: | Alban Hertroys <alban(at)magproductions(dot)nl> |
|---|---|
| To: | Michael Glaesemann <grzm(at)seespotcode(dot)net> |
| Cc: | Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>, pgsql-general <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: Why *exactly* is date_trunc() not immutable ? |
| Date: | 2007-02-19 09:16:12 |
| Message-ID: | 45D96ADC.50907@magproductions.nl |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Michael Glaesemann wrote:
>
> On Feb 19, 2007, at 18:04 , Alban Hertroys wrote:
>
>> Michael Glaesemann wrote:
>>>
>>> On Feb 18, 2007, at 20:29 , Karsten Hilbert wrote:
>>>
>>>> What I don't understand, however, is exactly *why* date_trunc is not
>>>> immutable ?
>>>
>>> I believe it's because the result of date_trunc depends on the time zone
>>> setting for the session.
>>
>> I understand the reasoning, but _under the conditions_ it is being used
>> by the OP it could have been immutable, right?
>
> *Under the conditions* doesn't really make sense wrt immutable
> functions. Immutable means is immutable under all conditions.
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.
--
Alban Hertroys
alban(at)magproductions(dot)nl
magproductions b.v.
T: ++31(0)534346874
F: ++31(0)534346876
M:
I: www.magproductions.nl
A: Postbus 416
7500 AK Enschede
// Integrate Your World //
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Karsten Hilbert | 2007-02-19 09:36:36 | Re: Why *exactly* is date_trunc() not immutable ? |
| Previous Message | Alban Hertroys | 2007-02-19 09:12:42 | Re: complex referential integrity constraints |