Re: Bug fix for missing years in make_date() - Mailing list pgsql-hackers

From David Fetter
Subject Re: Bug fix for missing years in make_date()
Date
Msg-id 20150331151037.GA27800@fetter.org
Whole thread Raw
In response to Re: Bug fix for missing years in make_date()  (Adam Brightwell <adam.brightwell@crunchydatasolutions.com>)
Responses Re: Bug fix for missing years in make_date()  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Adam Brightwell
Date:
Subject: Re: Bug fix for missing years in make_date()
Next
From: Bruce Momjian
Date:
Subject: Re: printing table in asciidoc with psql