From: Josh Berkus <josh@agliodbs.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Josh Berkus <josh@agliodbs.com>
Cc: Allan Engelhardt <allane@cybaea.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Re: Data type confusion
Date: Mon, 06 Aug 2001 14:59:00 -0700
Message-ID: <web-97649@davinci.ethosmedia.com> (raw)
In-Reply-To: <24762.997134620@sss.pgh.pa.us>
Tom,
> Curiously enough, ANSI doesn't define an INTERVAL-divided-by-INTERVAL
> function either. Also, it rather looks like ANSI adopted the
> position
> Peter E. expressed:
>
> Year-month intervals are mutually comparable only with other
> year-
> month intervals. [...]
> Day-time intervals are mutually comparable only with other
> day-
> time intervals. [...]
> Operations involving items of type datetime require that the
> date-
> time items be mutually comparable. Operations involving
> items of
> type interval require that the interval items be mutually
> compara-
> ble.
Hmmm ... does this mean that I couldn't divide '1 year' by '1 week'? I
can certaily see not allowing division of '1 year' by '28 seconds' as it
spares us a whole bunch of calendar-generated fuzziness.
It seems to me that:
years,months,weeks,days / years,months,weeks,days is OK, and
days,hours,minutes,seconds / days,hours,minutes,seconds is also easy,
but
years,months,weeks / hours,minutes,seconds is where we get in trouble.
So I propose that we suppot the first two and disallow the third.
Thus I think that we can adhere to the spec, while still providing the
functionality developers want and avoiding a whole lot of '5 months 11
minutes' type headaches.
-Josh
______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh@agliodbs.com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco
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: josh@agliodbs.com, tgl@sss.pgh.pa.us, allane@cybaea.com
Subject: Re: Re: Data type confusion
In-Reply-To: <web-97649@davinci.ethosmedia.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