| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера