Jesse Scott <scotje@wwc.edu> writes:
> lastlogin timestamp DEFAULT 'now',
> firstlogin timestamp,
> EXTRACT(EPOCH FROM lastlogin) AS lastlogin,
> EXTRACT(EPOCH FROM firstlogin) AS firstlogin,
Btw ... although you are hitting a bug in EXTRACT(), I think the above
is pretty foolish. Timestamp without time zone is inherently not a well
defined point in time --- its meaning depends on the eye of the
beholder, or at least the timezone the beholder lives in. Timestamp
with time zone is what you want for recording the true time of any
well-defined event. (Defaulting "timestamp" to mean "without time zone"
is one of the many bad decisions that have been forced on us by SQL spec
compliance.)
regards, tom lane