[Dbix-class] Calling all database champions

Darren Duncan darren at DarrenDuncan.net
Sat May 26 22:14:33 GMT 2007


At 2:22 PM +0100 5/26/07, Matt S Trout wrote:
>On Sat, May 26, 2007 at 08:30:29AM -0400, Jason Kohles wrote:
>  > PostgreSQL has more than one timestamp type, which may show up in the 
>>  column_info as:
>>
>>  timestamp with time zone
>>  timestamp without time zone
>>  timestamp
>>  timestamptz
>
>And none of those need special handling?
>
>Peopl who champion a specific DB engine, how would this work for you?
>
>I'm getting increasingly tempted to just sod it and apply jason's patch
>when he sends out a test case or two for it and we'll see what happens.

I didn't look at what that patch does, but as a general comment I 
should say that it is extremely important to treat stamps with 
timezones and those without as being distinct, if you have any care 
about representing accurate data, and DBIx::Class certainly ought to 
expose the difference.

FYI, here are parts of the definitions for 2 of QDRDBMS' temporal 
types, which may give a quick illustration of how the difference is 
significant:

   =item C<sys.type.Temporal.DateTime>

   A C<Temporal.DateTime> is a single specific time on a specific date, with
precision to arbitrary fractions of a second.  It I<does> incorporate an
explicit terrestrial time-zone offset (relative to UTC), so you use it when
you I<do know> the time-zone and it is significant (which is usually).  It
is conceptually calendar-agnostic.

   =item C<sys.type.Temporal.DateTimeNoTZ>

   A C<Temporal.DateTimeNoTZ> is the same as C<Temporal.DateTime> in its
precision, but it I<does not> incorporate an explicit terrestrial time-zone
offset interval, and so it is conceptually ambiguous within an interval of
about 25 hours; you use it when you I<do not know> the time-zone or it is
not significant (which is not usually).

Note that I've huffmanized things so that *with* time-zones is the 
default, since that is more accurate and is what people should use if 
they can.

As is typical in DBMS products, QDRDBMS also has other types that eg 
just have date parts or time parts, and they come in twin 
with/without timezone versions.

-- Darren Duncan



More information about the Dbix-class mailing list