Chris Bandy writes:
> On 5/24/18 2:31 PM, Tom Lane wrote:
>> Andrew Gierth writes:
>>> 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.
> Are we in agreement that the
On 5/24/18 2:31 PM, Tom Lane wrote:
Andrew Gierth writes:
"Tom" == Tom Lane 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) return
Andrew Gierth writes:
> "Tom" == Tom Lane 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 th
> "Tom" == Tom Lane 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 f
Chris Bandy writes:
> The documentation explains that DATE is first cast to TIMESTAMP. (As I
> understand it, this is an immutable cast; sounds find and appropriate.)
> https://www.postgresql.org/docs/current/static/functions-datetime.html#FUNCTIONS-DATETIME-TRUNC
> But in my testing, the date va
I have an application generating the following query on a DATE column in
PostgreSQL 10.1:
> SELECT TO_CHAR(DATE_TRUNC('month', jobs.active_until), '-MM')
> FROM jobs
> GROUP BY DATE_TRUNC('month', jobs.active_until)
> LIMIT 500
I wanted to support it with an expression index, but was surpri