...lame use of casting, looking for workaround...

Поиск
Список
Период
Сортировка
Искать
От
Adam Haberlach
Тема
...lame use of casting, looking for workaround...
Дата
Msg-id
20010223104206.A24545@newsnipple.com
Список
Дерево обсуждения
Re: ...lame use of casting, looking for workaround... Richard Huxton <dev@archonet.com>
Re: ...lame use of casting, looking for workaround... Adam Haberlach <adam@newsnipple.com>
	One of the rocket scientests working on this project has
created a system in which /either/ a description or a build
number is stored in a text field.  He has been writing reports
that use CAST AS('description', int4) to convert the field into
either 0 or a number.  It looks like 7.1beta4 doesn't like this
silly hack, since I get pg_atoi errors when the query hits
anything that doesn't consist entirely of a number (and rightly
so).

	I'm looking for a workaround that will let him do his
"conversion" transparently: some form of atoi that will return
0 if it finds no numbers instead of blowing up.  Anyone got
one?


-- 
Adam Haberlach            | All your base are belong to us.
adam@newsnipple.com       |
http://www.newsnipple.com |
'88 EX500    '00 >^<      |
В списке pgsql-general по дате отправления
От: Bruce Momjian
Дата:
Сообщение: Re: Re: how critical is WAL
От: Stephan Szabo
Дата:
Сообщение: Re: Date difference in seconds
FAQ