[Ilugc] Q&A from Monthly Meet - Aug 8-2015

  • From: kidbees@xxxxxxxxx (Bala Kumar)
  • Date: Wed, 12 Aug 2015 23:11:24 +0530

Hi everyone,
          During the meet - I raised an open question regarding leap
seconds and how
are they handled in DB's. Everyone had our opinions and most of the
attendees
suggested it is taken care by the OS.

Looks like Leap second is handled by DB as well because of the usage
of *now()* function. Found this link interesting
 https://dev.mysql.com/doc/refman/5.5/en/time-zone-leap-seconds.html.

In recent versions of MySQL - leap second 59:60 is reverted to 59:59 and
because
of this decrement there can be ambiguities in our where queries. For
accurate
query results MySQL suggest using *UNIX_TIMESTAMP(timestamp_column).*

Have discussed queries in this shared document:
https://docs.google.com/document/d/16CNBxIQGMbVoSgbg297h7b8rdr8huirTeb7XVt3PGAM/edit

Leap Second example in the Shared link is from MySQL doc and when I tried
it on my
machine, I found it not working - very recently someone have commented the
same in their official doc - let me know if the example actually works.

 PS: http://www.postgresql.org/docs/9.1/static/functions-datetime.html says
       "PostgreSQL uses UT1 because leap seconds are not handled." Also
Interested
        to know if there are any such MySQL like decrements for leap
seconds in
        PostgreSQL too.

Thanks,
Bala.

Other related posts:

  • » [Ilugc] Q&A from Monthly Meet - Aug 8-2015 - Bala Kumar