Re: Data type confusion - Mailing list pgsql-sql

From Allan Engelhardt
Subject Re: Data type confusion
Date
Msg-id 3B6DC695.599C2571@cybaea.com
Whole thread Raw
In response to Data type confusion  ("Josh Berkus" <josh@agliodbs.com>)
Responses Re: Re: Data type confusion  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
Josh Berkus wrote:

> This is a multi-part MIME message
>
> --_===97089====davinci.ethosmedia.com===_
> Content-Type: text/plain; charset="ISO-8859-1"
> Content-Transfer-Encoding: 8bit
>
> Tom, Stephan,
>
> I'm writing up the date/time FAQ, and I came across some operator
> behavior that confuses me:
>
> If
> INTERVAL / INTEGER = INTERVAL
>
> then why does
> INTERVAL / INTERVAL = ERROR?
>
> Shouldn't
> INTERVAL / INTERVAL = INTEGER?
>
> I'd like to answer this before I finish the FAQ, as it seems
> inconsistent behavior.
>
> -Josh
>
>

Josh,

I'm not Tom or Stephan (sorry) but in your scenario what would be the result of, say, dividing '3 months ago' with '6
seconds'in the future?
 

I don't think it makes conceptual sense to divide intervals....


Allan.



pgsql-sql by date:

Previous
From: "Josh Berkus"
Date:
Subject: Re: Re: Date Time Functions - ANSI SQL ?
Next
From: Tom Lane
Date:
Subject: Re: Data type confusion