Re: isnumeric() function?

Поиск
Список
Период
Сортировка
От Frank Bax
Тема Re: isnumeric() function?
Дата
Msg-id 5.2.1.1.0.20040430121848.02a4cda0@pop6.sympatico.ca
обсуждение исходный текст
Ответ на Re: isnumeric() function?  ("Yudie" <yudie@axiontech.com>)
Список pgsql-sql
At 11:29 AM 4/30/04, Yudie wrote:
>Great the function works, but what does it means?
>SELECT $1 ~ ''^[0-9]+$''
>
>Yudie


The ~ is a pattern matching operator.        ^ matches beginning of string        [0-9] matches any numeric digit 0
thru9.        + matches one or more occurrences of what came before (digits in 
 
this case)        $ matches end of string
The ^ and $ are important - if they were left out, the pattern would match 
a string containing both numeric and non-numeric data.

You can change the + to * if you decide that an empty string should be 
considered numeric.

Frank 



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Permissions not working
Следующее
От: Pallav Kalva
Дата:
Сообщение: Re: Permissions not working