title: Calculate sunrise and sunset times for a given GPS coordinate within PostgreSQL
body: <p>I want to classify <code>timestamp</code> data types in a PostgreSQL table with regards to whether they can be considered "at day" or "at night". In other words I want to be able to calculate sunrise and sunset times accurately, given a particular GPS position. </p>
  
  <p>I know plpgsql and plpython.</p>