From: Dean Gibson (DB Administrator) <postgresql3@ultimeth.com>
To: pgsql-sql@postgresql.org
Subject: Difference in DATEs
Date: Tue, 21 Sep 2004 00:38:59 -0700
Message-ID: <5.1.0.14.2.20040921003212.00a958d8@postgresql3.ultimeth.com> (raw)
Assume that x and y are of type DATE:
1. AGE( x, y ) < INTERVAL '...' works.
2. x < y + INTERVAL '...' works.
3. x - y < INTERVAL '...' doesn't work (but then, the minus operator is not
defined in the manual for two DATE values).
Question: Is the meaning of x - y well-defined? That is, is there a
definition that I can count on?
Not an important question, but I'm curious, since I like to write date
differences in a style that makes readability/maintenance easy.
-- Dean
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: postgresql3@ultimeth.com
Subject: Re: Difference in DATEs
In-Reply-To: <5.1.0.14.2.20040921003212.00a958d8@postgresql3.ultimeth.com>
* 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