Re: Unexpected casts while using date_trunc() - Mailing list pgsql-hackers

From Andrew Gierth
Subject Re: Unexpected casts while using date_trunc()
Date
Msg-id 87muwo27f7.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Re: Unexpected casts while using date_trunc()  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Unexpected casts while using date_trunc()
List pgsql-hackers
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:

 Tom> Yeah.  There are two relevant variants of date_trunc():
 [...]
 Tom> So we probably ought to change the docs here.

There's also the option of adding an explicit function
date_trunc(text,date) returns date, which is a workaround that I (and
probably quite a few other people) have used. I think having such a
function added to core would be less surprising than the current
behavior.

-- 
Andrew (irc:RhodiumToad)


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Unexpected casts while using date_trunc()
Next
From: Tom Lane
Date:
Subject: contrib/sepgsql fails on Fedora 28