Re: Timestamp operator error

From: "Josh Berkus" <josh(at)agliodbs(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Josh Berkus" <josh(at)agliodbs(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Timestamp operator error
Date: 2002-02-26 04:34:36
Message-ID: web-810140@davinci.ethosmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Tom,

> AFAICT, what's happening in 7.2 is that the closest-match operator
> is "time + date", so it casts the interval to time (yielding 0
> hours),
> and casts current_timestamp to date (yielding midnight today)
> and adds.

Any suggestions on an emergency fix for my (production) database?
We've already seen a couple of major problems from this bug, and I'm
worried that there will be others that I don't catch until it's too
late. If I had the know-how, I'd fix the operator myself, but I
don't.

> I suspect this is good ammunition for the argument I've made from
> time
> to time that we have too many implicit conversions, not too few.

Yes, definitely. Frankly, I'd prefer a large reduction in implicit
conversions; I just got into trouble with the difference between
current_timestamp and current_date that I would have caught much
earlier if Postgres had disallowed the implicit conversion.

-Josh

______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh(at)agliodbs(dot)com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2002-02-26 04:47:35 Re: Timestamp operator error
Previous Message Tom Lane 2002-02-26 04:28:14 Re: Timestamp operator error