Re: Compare an integer to now() - interval '3 days'

Поиск
Список
Период
Сортировка
От Vibhor Kumar
Тема Re: Compare an integer to now() - interval '3 days'
Дата
Msg-id 7774C058-7E17-4486-812C-915EDDA1EB8A@enterprisedb.com
обсуждение исходный текст
Ответ на Compare an integer to now() - interval '3 days'  (Alexander Farber <alexander.farber@gmail.com>)
Список pgsql-general
On Mar 11, 2011, at 6:44 PM, Alexander Farber wrote:

> from drupal_field_data_field_gender g, drupal_users u
> where g.field_gender_value='Robot' and
> u.uid=g.entity_id and u.created::timestamp > now() - interval '1 day';
> ERROR:  cannot cast type integer to timestamp without time zone


Use to_timestamp function. For more detail refer following documentation:
http://www.postgresql.org/docs/8.3/static/functions-formatting.html

Thanks & Regards,
Vibhor Kumar
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
vibhor.kumar@enterprisedb.com
Blog:http://vibhork.blogspot.com


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

Предыдущее
От: Szymon Guz
Дата:
Сообщение: Re: Compare an integer to now() - interval '3 days'
Следующее
От: "Igor Neyman"
Дата:
Сообщение: Re: sort mem: size in RAM vs size on Disk