From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Jesse Scott <scotje(at)wwc(dot)edu> |
Cc: | Postgresql SQL Mailing List <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: Timezone troubles |
Date: | 2003-08-14 11:26:46 |
Message-ID: | 15437.1060860406@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Jesse Scott <scotje(at)wwc(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Jomon Skariah | 2003-08-14 13:46:53 | Porting from PL/SQL to PLPGSQL |
Previous Message | Tom Lane | 2003-08-14 11:20:06 | Re: Timezone troubles |