Re: CAST and timestamp

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: CAST and timestamp
Дата
Msg-id
2331.1103601757@sss.pgh.pa.us
Ответ на
Re: CAST and timestamp (Keith Worthington)
Список
Дерево обсуждения
CAST and timestamp "Keith Worthington" <keithw@narrowpathinc.com>
Re: CAST and timestamp Tom Lane <tgl@sss.pgh.pa.us>
Re: CAST and timestamp Keith Worthington <KeithW@NarrowPathInc.com>
Re: CAST and timestamp Mike G <mike@thegodshalls.com>
Re: CAST and timestamp Tom Lane <tgl@sss.pgh.pa.us>
Re: CAST and timestamp Mike G <mike@thegodshalls.com>
Re: CAST and timestamp Geoffrey <esoteric@3times25.net>
Re: CAST and timestamp Tom Lane <tgl@sss.pgh.pa.us>
Re: CAST and timestamp "Keith Worthington" <keithw@narrowpathinc.com>
Keith Worthington  writes:
> Tom Lane wrote:
>> Try casting the inputs to type "text" and then to timestamp or real.

> Are you saying that I should try something like
> CAST( CAST( quantity AS text ) AS float4) AS quantity

Right.  (In the cases where you were concatenating, do that inside the
first cast.)

BTW, Postgres hackers would tend to write the above as

	quantity::text::float4

which is not SQL-spec notation but sure saves a lot of typing.

			regards, tom lane
В списке pgsql-novice по дате отправления
От: Keith Worthington
Дата:
Сообщение: Re: CAST and timestamp
От: Mike G
Дата:
Сообщение: Re: CAST and timestamp
FAQ