On May 29, 2007, at 0:06 , Neil Conway wrote:
Applied to HEAD, backported to 8.2 and 8.1
One thing I noticed when looking over the patch is that there are a
few bare numbers in datetime.c such as 10, 1000, 1e-3, and 1e-6.
In timestamp.[hc] we've defined macros for conversions such as
On Mon, 2007-28-05 at 13:54 -0400, Neil Conway wrote:
> Okay, attached is a patch that does this. To summarize, the changes are:
>
>* add tmask bits for msec, usec (I reordered the #defines to keep
> them logically contiguous, but AFAICS this isn't necessary)
>* if the user specifies
Neil Conway <[EMAIL PROTECTED]> writes:
> On Mon, 2007-28-05 at 15:05 -0400, Tom Lane wrote:
>> Hmmm ... if you check the cvs history for those tests you might find
>> some evidence.
> "Modify regression tests to allow GEQ optimizer (order results).",
> according to the 1997 CVS commit from Thomas
On Mon, 2007-28-05 at 15:05 -0400, Tom Lane wrote:
> Right. I guess you misunderstood me: I was arguing for rejecting double
> occurrences of the same unit name, but not occurrences of different unit
> names that we happen to map into the same interval field internally.
Makes sense to me. I'll se
Neil Conway <[EMAIL PROTECTED]> writes:
> On Mon, 2007-28-05 at 10:50 -0400, Tom Lane wrote:
>> I'd argue that it's an oversight. I don't have a problem with adding up
>> the values of units that really translate to the same thing (eg,
>> '1 week 1 day' -> '8 days'), but I think '1 second 2 second
On Mon, 2007-28-05 at 10:50 -0400, Tom Lane wrote:
> I'd argue that it's an oversight. I don't have a problem with adding up
> the values of units that really translate to the same thing (eg,
> '1 week 1 day' -> '8 days'), but I think '1 second 2 second' should
> be rejected because it's almost ce
Neil Conway <[EMAIL PROTECTED]> writes:
> Is there any reason to why DecodeInterval() is willing to accept
> multiple specifications for some time units but not others?
I'd argue that it's an oversight. I don't have a problem with adding up
the values of units that really translate to the same th
neilc=# select '1 day 1 millisecond'::interval;
interval
1 day 00:00:00.001
(1 row)
neilc=# select '1 millisecond'::interval;
ERROR: invalid input syntax for type interval: "1 millisecond"
neilc=# select '0.001 seconds'::interval;
interval
--
00