Re: to_char not IMMUTABLE?

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: to_char not IMMUTABLE?
Дата
Msg-id 20070112134859.GB11291@svana.org
обсуждение исходный текст
Ответ на to_char not IMMUTABLE?  (Mario Weilguni <mweilguni@sime.com>)
Ответы Re: to_char not IMMUTABLE?  (Mario Weilguni <mweilguni@sime.com>)
Список pgsql-hackers
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?

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Gregory Stark
Дата:
Сообщение: Re: [PERFORM] unusual performance for vac following 8.2upgrade
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Stamp major release 8.3.0,