Thread: bug? incorrect return type from extract

bug? incorrect return type from extract

From
Pavel Stehule
Date:
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

From
Tom Lane
Date:
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