pg_atoi error?

From: Lynna Landstreet <lynna(at)gallery44(dot)org>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: pg_atoi error?
Date: 2003-07-30 23:03:18
Message-ID: BB4DC6F6.872%lynna@gallery44.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi folks,

Run into a wee problem here. I just attempted to flush and re-populate the
images table in my database, because I realized I'd done something in an
inefficient way. But now I'm getting an error when I try to use \copy in
psql to re-load the modified text file into the table. Here's the error I'm
getting:

ERROR: copy: line 1, pg_atoi: error in "1339": can't parse "1339"
lost synchronization with server, resetting connection

Here's what I was telling psql:

\copy images from images.txt using delimiters '|' with null as ''

And here's the contents of Line 1 in the text file I was using:

1339|/akimoto_shinobu/akimoto1.jpg|Secretary Project (installation
view)||chromogenic (colour) prints|7.5 x 10.8 cm each||1998|Slide||In
<i>Secretary Project,</i> Akimoto demonstrates, through ritualistic
documentation of her commuter train and locker, how mundane and repetitive
labour, limited time, space and resources, and the social imperative to
conform, shape and direct artistic practice.|2003-3-19|Lynna
Landstreet|2003-3-19|Lynna Landstreet

It doesn't look to me as though there should be anything particularly
contentious in there. The string quoted in the error message does not
appear, and there are no non-ASCII characters, Mac line returns or anything
else untoward in that row. The database is set to Unicode encoding, and the
text file was saved as Unicode/UTF-8 from my text editor, BBEdit (BBEdit Pro
7.0.3 introduced that option, which is very handy).

I've already tried the following:

- Stripping out and replacing all line returns in the file, while making
sure line returns are set to UNIX.
- Setting line returns to Unicode and doing likewise.
- Using BBEdit's "Zap Gremlins" feature to search for hidden control
characters and the like.
- Uploading the file both as ASCII and as binary to see if that made a
difference

This is the exact same text file I originally populated the table from --
the only difference is that I stripped out the string "/db_images" from the
beginning of the image_path field in each row. Does anyone have any idea
what might be causing this error message?

Lynna
--
Resource Centre Database Coordinator
Gallery 44
www.gallery44.org

Browse pgsql-novice by date

  From Date Subject
Next Message Cath Lawrence 2003-07-31 01:10:23 Re: designing tables for blobs - what are the guidelines?
Previous Message Andrew Vit 2003-07-30 20:01:38 Re: designing tables - sidetrack into arrays