Re: Possibly misleading documentation of Template Patterns for Date/Time Formatting

From: David Kubecka <davidkubecka366(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Possibly misleading documentation of Template Patterns for Date/Time Formatting
Date: 2020-04-19 18:09:44
Message-ID: CAKtMQEd3WAfZsXJ9XpK-k6haMBNW-C591zPuBU_s20gy4947XA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

ne 19. 4. 2020 v 15:42 odesílatel Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> napsal:

> David Kubecka <davidkubecka366(at)gmail(dot)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
>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2020-04-19 18:11:37 Re: BUG #16378: Invalid memory access on interrupting CLUSTER after CREATE TEMP TABLE
Previous Message Tom Lane 2020-04-19 17:20:07 Re: BUG #16379: configure with krb5 in centos6 will compile without linking to library com_err and krb5