Обсуждение: bug? incorrect return type from extract

Поиск
Список
Период
Сортировка

bug? incorrect return type from extract

От
Pavel Stehule
Дата:
Hello

Is correct so extract(day from current_date) return double? I need
explicit cast for this expression

current_date - extract(day from current_date) + 1 -- don't work

ERROR:  operator does not exist: date - double precision
HINT:  No operator matches the given name and argument type(s). You may
need to add explicit typecasts.

why? I have cvs PostgreSQL updated 23.7.

regards,
Pavel Stehule


Re: bug? incorrect return type from extract

От
Tom Lane
Дата:
Pavel Stehule <stehule@kix.fsv.cvut.cz> writes:
> Is correct so extract(day from current_date) return double?

extract(anything) returns double.

            regards, tom lane