Re: Timestamp operator error

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Timestamp operator error
Дата
Msg-id web-810140@davinci.ethosmedia.com
обсуждение исходный текст
Ответ на Re: Timestamp operator error  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Timestamp operator error  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Timestamp operator error
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Timestamp operator error