| From: | Mario Weilguni <mweilguni(at)sime(dot)com> |
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org, Martijn van Oosterhout <kleptog(at)svana(dot)org> |
| Subject: | Re: to_char not IMMUTABLE? |
| Date: | 2007-01-12 14:07:32 |
| Message-ID: | 200701121507.32274.mweilguni@sime.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Am Freitag, 12. Januar 2007 14:48 schrieb Martijn van Oosterhout:
> On Fri, Jan 12, 2007 at 11:55:07AM +0100, Mario Weilguni wrote:
> > to_char(timestamp, 'yyyy') should be constant and marked immutable,
> > or am I wrong here? Or is it not marked immutable because of possible
> > changes on date_format?
>
> AIUI, to_char is not immutable because it can be effected by external
> variables, like LC_TIME.
>
> As it is though, I'm not sure why you're using to_char here, surely
> extract or date_truc would be more appropriate?
Thanks for the info. Changing this to use extract is no real problem, I was
just curious if this is intendend behaviour.
Best regards,
Mario Weilguni
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2007-01-12 14:16:23 | Re: Corrupt database? 8.1/FreeBSD6.0 |
| Previous Message | Tom Lane | 2007-01-12 14:04:40 | Re: [COMMITTERS] pgsql: Stamp major release 8.3.0, |