bug? incorrect return type from extract

Started by Pavel Stehuleover 22 years ago2 messagesgeneral
Jump to latest
#1Pavel Stehule
pavel.stehule@gmail.com

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

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Pavel Stehule (#1)
Re: bug? incorrect return type from extract

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