Thread: pg_atoi problem with 7.3.2
Something in 7.3.2 seems to have broken the dbf2pg program in the contrib directory. When I run it on 7.3.1 with a particular dBase file, it works fine. If I run it on that same 7.3.1 system but using a 7.3.2 system as the host, it still works. But when I try to run it directly on the 7.3.2 system I get the following: ERROR: copy: line 174507, pg_atoi: zero-length string lost synchronization with server, resetting connection Something went wrong while copying. Check your tables! I also get this error if I run it on the 7.3.2 system directing it towards the 7.3.1 system as the host. The 7.3.2 system is running Red Hat 8.0, linux kernel version 2.4.20. the 7.3.1 system is running Red Hat 5.1, linux kernel version 2.2.23. Any suggestions on where to look for the problem? I've tried looking for pg_atoi issues in the archives but don't see anything recent. Is there a more recent version of the dbf2pg program than the one in the contrib directory for 7.3.2? -- Mike Nolan
It's a change to pg_atoi, it used to default a zero length string to 0, now it whines. There is a patch floating around to change it, but your app needs to change at some point. LER --On Sunday, May 18, 2003 17:27:10 -0500 nolan@celery.tssi.com wrote: > Something in 7.3.2 seems to have broken the dbf2pg program in the contrib > directory. > > When I run it on 7.3.1 with a particular dBase file, it works fine. If > I run it on that same 7.3.1 system but using a 7.3.2 system as the host, > it still works. > > But when I try to run it directly on the 7.3.2 system I get the following: > > ERROR: copy: line 174507, pg_atoi: zero-length string > lost synchronization with server, resetting connection > Something went wrong while copying. Check your tables! > > I also get this error if I run it on the 7.3.2 system directing it > towards the 7.3.1 system as the host. > > The 7.3.2 system is running Red Hat 8.0, linux kernel version 2.4.20. > the 7.3.1 system is running Red Hat 5.1, linux kernel version 2.2.23. > > Any suggestions on where to look for the problem? I've tried looking for > pg_atoi issues in the archives but don't see anything recent. > > Is there a more recent version of the dbf2pg program than the one in > the contrib directory for 7.3.2? > -- > Mike Nolan > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: ler@lerctr.org US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
Larry Rosenman <ler@lerctr.org> writes: > It's a change to pg_atoi, it used to default a zero length string to > 0, now it whines. But that change was present in 7.3 (and 7.3.1). Right offhand I see nothing in the 7.3.2 change list that would explain the difference of behavior Mike is reporting between 7.3.1 and 7.3.2. regards, tom lane
--On Monday, May 19, 2003 20:30:08 -0400 Tom Lane <tgl@sss.pgh.pa.us> wrote: > Larry Rosenman <ler@lerctr.org> writes: >> It's a change to pg_atoi, it used to default a zero length string to >> 0, now it whines. > > But that change was present in 7.3 (and 7.3.1). Right offhand I see > nothing in the 7.3.2 change list that would explain the difference of > behavior Mike is reporting between 7.3.1 and 7.3.2. I didn't read carefully enough today :-( (one of my co-workers was let go today, and I've been concentrating on a BIG password change). LER > > regards, tom lane -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: ler@lerctr.org US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
> But that change was present in 7.3 (and 7.3.1). Right offhand I see > nothing in the 7.3.2 change list that would explain the difference of > behavior Mike is reporting between 7.3.1 and 7.3.2. Um, never mind. :sigh: Though I was unaware of the pg_atoi change, I came up with a patch for this problem back in January because some of the files I'm converting from have some zero length numeric fields in it that dBase and Access don't complain about. Those files were having some other problems that I thought might have been related to the zero length field issue. Apparently I didn't get that patch compiled on the system I am running 7.3.2 on when I built it last month, though I have the modified source there. After I compile the modified source, it works on that system. I must have gotten sidetracked before I got it compiled that night. Can I crawl under a rock and hide somewhere? -- Mike Nolan