Re: problem with casting

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: problem with casting
Дата
Msg-id 3A8C040F.E82255AE@agliodbs.com
обсуждение исходный текст
Ответ на problem with casting  ("postgresql" <pgsql@symcom.com>)
Список pgsql-sql
Ted,

> responce:   can not cast type 'date' to 'text'
> 
> Did i miss-read this section. I thought I could cast the date to text. has anyone seen
> this or am I missreading the docs?

'fraid so.   You cannot cast Date as Text, because (presumably) the DB
engine doesn't know how you want to format the date.  Instead, use the
to_char builtin function, as defined in the docs:
http://www.postgresql.org/users-lounge/docs/7.0/postgres/functions2976.htm

Share & Enjoy!
-Josh Berkus

-- 
______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: [ADMIN] TPCH questions
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: [ADMIN] TPCH questions