Re: pg_atoi error

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: pg_atoi error
Дата
Msg-id 20040123162214.GA12170@wolff.to
обсуждение исходный текст
Ответ на pg_atoi error  (LIANHE SHAO <lshao2@jhmi.edu>)
Список pgsql-novice
Please keep threads on the mailing list.

On Fri, Jan 23, 2004 at 15:32:47 +0000,
  LIANHE SHAO <lshao2@jhmi.edu> wrote:
>
> > > So, How can I avoid these annoying message?
> >
> > You can either have your application handle
> obviously bogus data or
> > you can write a function in postgres that converts
> text to int using
> > whatever rules you want for assigning values to
> nonnumeric strings.
> >
>
> The above query is simple, but my query sometimes is
>  kind of complex. If I have to manually deal with
> each possible bogus data or use functions to convert
> each string to number, beside lot of overhead, maybe
> there are somethings you still forget to do. Seems
> it does not solve the problem completely.

This doesn't make sense. If you want to treat all garbage data as being
the same as 0, just write a function to do it. If you don't know what to
do with the garbage data, how do you expect Postgres to do the right thing
on its own.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 7.4.1 template1
Следующее
От: April Carvalho
Дата:
Сообщение: Re: Problem with pg_hba.conf file in Postgres 7.3