Re: Interval input: usec, msec

From: Neil Conway <neilc(at)samurai(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Interval input: usec, msec
Date: 2007-05-29 02:42:36
Message-ID: 1180406556.6648.57.camel@goldbach
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
geqo_regression-1.patch text/x-patch 6.9 KB

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2007-05-29 02:49:20 Re: boolean <=> text explicit casts
Previous Message Neil Conway 2007-05-29 02:42:11 Re: boolean <=> text explicit casts