Re: Bug fix for missing years in make_date()

Поиск
Список
Период
Сортировка
От David Fetter
Тема Re: Bug fix for missing years in make_date()
Дата
Msg-id 20150331151037.GA27800@fetter.org
обсуждение исходный текст
Ответ на Re: Bug fix for missing years in make_date()  (Adam Brightwell <adam.brightwell@crunchydatasolutions.com>)
Ответы Re: Bug fix for missing years in make_date()  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Tue, Mar 31, 2015 at 10:34:45AM -0400, Adam Brightwell wrote:
> >
> > Good point.  Next patch attached.
> 
> 
>   /*
> - * Note: we'll reject zero or negative year values.  Perhaps negatives
> - * should be allowed to represent BC years?
> + * Note: Non-positive years are taken to be BCE.
>   */
> 
> Previously, zero was rejected, what does it do now? I'm sure it represents
> 0 AD/CE, however, is that important enough to note given that it was not
> allowed previously?

Now, it's supposed to take 0 as 1 BCE, -1 as 2 BCE, etc.  There should
probably be tests for that. The issue here is that zero was
popularized a very long time after the beginning of the Common Era.

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Adam Brightwell
Дата:
Сообщение: Re: Bug fix for missing years in make_date()
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: printing table in asciidoc with psql