title: Cast or extract timestamp from v1 UUID in PostgreSQL
body: <p>I'm trying to extract the timestamp from a <a href="https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)" rel="nofollow noreferrer">Version 1 UUID</a>, naively wished this worked:</p>
  <pre><code>SELECT '3efe0a20-f1b3-11e3-bb44-14109fec739e'::uuid::timestamp;
  </code></pre>
  <p>Here is a quick example showing how to extract the time in Go, but I'm hoping PostgreSQL has something built-in rather than creating a one-off   PL/pgSql function:<br />
  <a href="http://play.golang.org/p/XRCooLgfaG" rel="nofollow noreferrer">http://play.golang.org/p/XRCooLgfaG</a></p>