Re: Multi calendar system for pgsql - Mailing list pgsql-hackers

From Sam Mason
Subject Re: Multi calendar system for pgsql
Date
Msg-id 20090218174611.GR32672@frubble.xen.chris-lamb.co.uk
Whole thread Raw
In response to Multi calendar system for pgsql  (Mohsen Alimomeni <m.alimomeni@gmail.com>)
List pgsql-hackers
On Wed, Feb 18, 2009 at 07:50:31PM +0330, Mohsen Alimomeni wrote:
> Multi calendar systems are useful for several languages and countries using
> different calendar: Hijri, Persian, Hebrew, etc.

When would the differences between these calenders actually show
up?  I can only think of it affecting input/output routines and the
date_part,date_trunc,to_date and to_char routines.  But am I missing
something?

If that's all, then how about just treating the current PG
date types as Julian days (as far as I know, that's how it's
treated internally anyway) and providing a multi-calender set of
date_part,date_trunc,to_date and to_char routines.  I.e. leave out the
input/output routines.

Doing this would be much easier, but less fun, than creating whole new
types and having to modify the parser as well to recognize the new
syntax.

--  Sam  http://samason.me.uk/


pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: The science of optimization in practical terms?
Next
From: Tom Lane
Date:
Subject: Re: graph representation of data structures in optimizer