Re: Possibly misleading documentation of Template Patterns forDate/Time Formatting

Поиск
Список
Период
Сортировка
От David Kubecka
Тема Re: Possibly misleading documentation of Template Patterns forDate/Time Formatting
Дата
Msg-id CAKtMQEd3WAfZsXJ9XpK-k6haMBNW-C591zPuBU_s20gy4947XA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Possibly misleading documentation of Template Patterns for Date/Time Formatting  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #16379: configure with krb5 in centos6 will compile without linking to library com_err and krb5
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #16378: Invalid memory access on interrupting CLUSTER after CREATE TEMP TABLE