| От | Martijn van Oosterhout |
|---|---|
| Тема | Re: Sorting by numerical order |
| Дата | |
| Msg-id | 20040314230953.GA23397@svana.org обсуждение |
| Ответ на | Re: Sorting by numerical order (Mike Nolan <nolan@gw.tssi.com>) |
| Ответы |
Re: Sorting by numerical order
|
| Список | pgsql-general |
On Sun, Mar 14, 2004 at 04:59:45PM -0600, Mike Nolan wrote: > On a somewhat related subject, how difficult would it be to write an > 'isnumeric' function as part of the source code as opposed to a user > function in pgsql or perl? Regular expressions? Something like: column ~ '^[-+]?[0-9]+(\.[0-9]+)?$' Should do the trick. Ofcourse, if you're dealing with exponentials you'll need to add more, browsing the web should give you some examples. I don't see writing it in C being significantly faster, but it's possible I guess. -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > If the Catholic church can survive the printing press, science fiction > will certainly weather the advent of bookwarez. > http://craphound.com/ebooksneitherenorbooks.txt - Cory Doctorow
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера