Re: Possibly misleading documentation of Template Patterns forDate/Time Formatting - Mailing list pgsql-bugs

From David Kubecka
Subject Re: Possibly misleading documentation of Template Patterns forDate/Time Formatting
Date
Msg-id CAKtMQEd3WAfZsXJ9XpK-k6haMBNW-C591zPuBU_s20gy4947XA@mail.gmail.com
Whole thread Raw
In response to Re: Possibly misleading documentation of Template Patterns for Date/Time Formatting  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs


ne 19. 4. 2020 v 15:42 odesílatel Tom Lane <tgl@sss.pgh.pa.us> napsal:
David Kubecka <davidkubecka366@gmail.com> writes:
> Anyway, could you shed some light if there's any particular reason why TO_DATE(
> '2012-4', 'YYYY-Q' ) isn't supported?

You can't compute a specific date from that.  Nor does it lend itself to
combination with other fields to reach a specific date --- adding DD
doesn't do it, and if you add MM, you might as well not bother with Q.

I think you very well could if it works e.g. for months: TO_DATE( '2012-4', 'YYYY-MM' ) returns first date of the specified month, so Q could behave similarly.

Anyway, this is obviously not a big issue, just a minor inconvenience ;-)

                        regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #16379: configure with krb5 in centos6 will compile without linking to library com_err and krb5
Next
From: Tom Lane
Date:
Subject: Re: BUG #16378: Invalid memory access on interrupting CLUSTER after CREATE TEMP TABLE