pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Steve Crawford <scrawford@pinpointresearch.com>
Cc: DHS Webmaster <webmaster@dhs-club.com>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: bizarre AGE behaviour
Date: Wed, 03 Mar 2004 18:19:19 -0500
Message-ID: <19029.1078355959@sss.pgh.pa.us> (raw)
In-Reply-To: <200403031000.05524.scrawford@pinpointresearch.com>
References: <40461395.5324CFEE@dhs-club.com>
	<200403031000.05524.scrawford@pinpointresearch.com>

Steve Crawford <scrawford@pinpointresearch.com> writes:
> US Daylight Saving Time starts this year on April 4 when 0200 jumps to 
> 0300. The answers PostgreSQL gave are correct.

I suspect what the OP wants is non-timezone-aware behavior, which he
could get by casting the inputs of age() to timestamp without time
zone.  As written the system is preferring to interpret them as
timestamp with time zone.

Also, if what's really wanted is just resolution to the day level,
the date subtraction operator might be a lot better choice than
age() anyway.

regression=# select '06-01-04'::date - '04-01-04'::date;
 ?column?
----------
       61
(1 row)


			regards, tom lane



view thread (5+ messages)  latest in thread

Message-ID: <19029.1078355959@sss.pgh.pa.us>
Permalink:  ../19029.1078355959@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19029.1078355959@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, scrawford@pinpointresearch.com, webmaster@dhs-club.com
  Subject: Re: bizarre AGE behaviour
  In-Reply-To: <19029.1078355959@sss.pgh.pa.us>
  References: <40461395.5324CFEE@dhs-club.com> <200403031000.05524.scrawford@pinpointresearch.com> <19029.1078355959@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox