Re: CAST and timestamp

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: CAST and timestamp
Дата
Msg-id 2331.1103601757@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: CAST and timestamp  (Keith Worthington <KeithW@NarrowPathInc.com>)
Ответы Re: CAST and timestamp
Список pgsql-novice
Keith Worthington <KeithW@NarrowPathInc.com> 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