Re: BUG #3848: function pg_catalog.substring(date, integer, integer) does not exist

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #3848: function pg_catalog.substring(date, integer, integer) does not exist
Дата
Msg-id 20940.1199222987@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #3848: function pg_catalog.substring(date, integer, integer) does not exist  (Sam Mason <sam@samason.me.uk>)
Ответы Re: BUG #3848: function pg_catalog.substring(date, integer, integer) does not exist  (Sam Mason <sam@samason.me.uk>)
Список pgsql-bugs
Sam Mason <sam@samason.me.uk> writes:
> I've just downloaded the source of tinyerp and had a look though and
> this practice seems pretty endemic.  They should really be using
>   to_char(date_exp, 'YYYY-MM')
> instead of
>   substring(date_exp FOR 7)
> in all their queries.

Or at least explicitly casting the date to text.  But your way is
better, since it won't break if the datestyle is something other
than ISO.

            regards, tom lane

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

Предыдущее
От: Sam Mason
Дата:
Сообщение: Re: BUG #3848: function pg_catalog.substring(date, integer, integer) does not exist
Следующее
От: Sam Mason
Дата:
Сообщение: Re: BUG #3848: function pg_catalog.substring(date, integer, integer) does not exist