Re: isnumeric - checking if text variable is convertable to numeric

Поиск
Список
Период
Сортировка
От Jaime Casanova
Тема Re: isnumeric - checking if text variable is convertable to numeric
Дата
Msg-id c2d9e70e0604242116j49bd4c8crde68026d1f83015e@mail.gmail.com
обсуждение исходный текст
Ответ на Re: isnumeric - checking if text variable is convertable to numeric  ("SunWuKung" <Balazs.Klein@t-online.hu>)
Ответы Re: isnumeric - checking if text variable is convertable to numeric  ("SunWuKung" <Balazs.Klein@t-online.hu>)
Список pgsql-general
On 24 Apr 2006 12:49:51 -0700, SunWuKung <Balazs.Klein@t-online.hu> wrote:
> I was trying to actually do a cast and trap the error but (beside not
> having succeeded in doing so) this is a much nicer way.
>
> Thanks.
> Balázs
>
>

in 8.1 you can use exception blocks

BEGIN
    statements
EXCEPTION
    WHEN condition [ OR condition ... ] THEN
        handler_statements
    [ WHEN condition [ OR condition ... ] THEN
          handler_statements
      ... ]
END;

http://www.postgresql.org/docs/8.1/static/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING

--
regards,
Jaime Casanova

"What they (MySQL) lose in usability, they gain back in benchmarks, and that's
all that matters: getting the wrong answer really fast."
                           Randal L. Schwartz

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

Предыдущее
От: Christopher Browne
Дата:
Сообщение: Re: How to have a blind-superuser
Следующее
От: Luckys
Дата:
Сообщение: Re: to know