Re: Timestamp operator error - Mailing list pgsql-sql

From Josh Berkus
Subject Re: Timestamp operator error
Date
Msg-id web-810140@davinci.ethosmedia.com
Whole thread Raw
In response to Re: Timestamp operator error  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Timestamp operator error
List 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
thisbug, and I'mworried that there will be others that I don't catch until it's toolate.  If I had the know-how, I'd
fixthe operator myself, but Idon'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 implicitconversions; I just got into trouble with the
differencebetweencurrent_timestamp and current_date that I would have caught muchearlier if Postgres had disallowed the
implicitconversion. 
 

-Josh 


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


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: Timestamp operator error
Next
From: Tom Lane
Date:
Subject: Re: Timestamp operator error