Skip site navigation (1) Skip section navigation (2)

Re: pg_atoi error

From: LIANHE SHAO <lshao2(at)jhmi(dot)edu>
To: Bruno Wolff III <bruno(at)wolff(dot)to>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: pg_atoi error
Date: 2004-01-23 17:34:39
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice

> Please keep threads on the mailing list.
> On Fri, Jan 23, 2004 at 15:32:47 +0000,
>  LIANHE SHAO <lshao2(at)jhmi(dot)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 
> beingthe 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.
Seems you missed my point. 
Actually I am wondering if pgsql can work on its own
with garbage data like mysql. for example if it
should be expid ='1' but I use it with expid='xyz'.
In this case, MySql will seliently give you 0 row
instead of error message. From your point, Seems
Pgsql will only give error message unless you deal
with it manually.



pgsql-novice by date

Next:From: Bruno Wolff IIIDate: 2004-01-23 17:57:05
Subject: Re: pg_atoi error
Previous:From: Tom LaneDate: 2004-01-23 17:02:59
Subject: Re: Problem with pg_hba.conf file in Postgres 7.3

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group