From: Tom Lane <tgl@sss.pgh.pa.us>
To: Wojtek <wojtg@polbox.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: What's wrong with my date/interval arithmetic?
Date: Tue, 02 Mar 2004 01:25:21 -0500
Message-ID: <23923.1078208721@sss.pgh.pa.us> (raw)
In-Reply-To: <16712460437.20040302150133@polbox.com>
References: <16712460437.20040302150133@polbox.com>
Wojtek <wojtg@polbox.com> writes:
> Why is the "result" incorrect (off by one day)?
> When I do the exactly same arithmetic using timestamps created
> with to_timestamp, everything is OK ("expected_result").
It is not "exactly the same arithmetic", because to_timestamp
delivers a result of type timestamp-with-time-zone, whereas your
other values are evidently timestamp without time zone. You did
not say what timezone setting you are using, but I think the
discrepancy is probably explained by that.
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, wojtg@polbox.com
Subject: Re: What's wrong with my date/interval arithmetic?
In-Reply-To: <23923.1078208721@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