pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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




view thread (3+ messages)  latest in thread

Message-ID: <5.1.0.14.2.20040921003212.00a958d8@postgresql3.ultimeth.com>
Permalink:  ../5.1.0.14.2.20040921003212.00a958d8@postgresql3.ultimeth.com/
Also on:    postgresql.org/message-id/5.1.0.14.2.20040921003212.00a958d8@postgresql3.ultimeth.com

 · 

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 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