Re: Interval input: usec, msec - Mailing list pgsql-patches

From Neil Conway
Subject Re: Interval input: usec, msec
Date
Msg-id 1180406556.6648.57.camel@goldbach
Whole thread Raw
In response to Re: Interval input: usec, msec  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Interval input: usec, msec
List pgsql-patches
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 send  a patch for this shortly (but I'll commit
the patch for the usec/msec issue first -- this second change shouldn't
be backpatched).

> I forget --- are the tmask bits used in stored typmod values for
> intervals?  It'd probably be best not to change the meanings of typmod
> bits, since those are visible to client code if it wants to look.

According to datetime.h, only some of the tmask bits are used in stored
typmods: YEAR, MONTH, DAY, HOUR, MINUTE, and SECOND, and the patch
doesn't modify any of those. So I think we're okay.

> 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 Lockhart that added the
lines in question. Presumably that is no longer relevant. Nothing
unexpected happens if the disabling of GEQO is removed, so I'll apply
the attached patch shortly barring any objections.

-Neil


Attachment

pgsql-patches by date:

Previous
From: Neil Conway
Date:
Subject: Re: boolean <=> text explicit casts
Next
From: Tom Lane
Date:
Subject: Re: boolean <=> text explicit casts