Re: Function testing if a string is a number ?

Поиск
Список
Период
Сортировка
От Arnaud Lesauvage
Тема Re: Function testing if a string is a number ?
Дата
Msg-id 43F9DCE5.8070103@freesurf.fr
обсуждение исходный текст
Ответ на Re: Function testing if a string is a number ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
Tom Lane a écrit :
> Arnaud Lesauvage <thewild@freesurf.fr> writes:
>> I am searching for a function that would return true if a string
>> is a number.
>> In Access I would have written IsNumeric('mystring'), but this
>> function does not exist in postgres.
>
> Write your own using a pattern test, for instance
>     varchar ~ '^[0-9]+$'
> See
> http://www.postgresql.org/docs/8.1/static/functions-matching.html

Oh yes ! Regular expressions !
I have to think about it now !!!

Thanks a lot Tom !

Regards
--
Arnaud


В списке pgsql-novice по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Function testing if a string is a number ?
Следующее
От: "Paolo De Simone"
Дата:
Сообщение: problems to install PostgreSQL