Re: 7.2 -> 7.3 incompatibility

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: 7.2 -> 7.3 incompatibility
Дата
Msg-id Pine.LNX.4.44.0302101526360.6138-100000@peter.localdomain
обсуждение исходный текст
Ответ на 7.2 -> 7.3 incompatibility  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Ответы Re: 7.2 -> 7.3 incompatibility  (Hannu Krosing <hannu@tm.ee>)
Список pgsql-hackers
Christopher Kings-Lynne writes:

> I found an example of a casting problem in our source code now that we're
> running 7.3:
>
> SELECT CURRENT_DATE - EXTRACT(DOW FROM CURRENT_DATE);

A mathematically sound way to write this would be:

select current_date - extract(dow from current_data) * interval '1 day';

> I'm not sure really why DOW needs to be double precision, but hey...

Extract returns double precision.  It can't morph itself based on the
argument type at run time.

-- 
Peter Eisentraut   peter_e@gmx.net



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: PGP signing releases
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Irix 6.2, Postgres 7.3.1, some brokenness