"20L" not interpreted as text.

From: "Collin F(dot) Lynch" <clynch(at)water2(dot)cs(dot)umass(dot)edu>
To: pgsql-hackers(at)postgresql(dot)org
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: "20L" not interpreted as text.
Date: 1999-08-12 14:38:15
Message-ID: 199908121438.KAA03599@water2.cs.umass.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-interfaces

Greetings, I'm having a peculiar problem that I seem unable to work my way around.
using pgtclsh I am attempting to load a file into postgres using the copy command specifically;

copy SensorDagta from '...../TempFile.txt' using delimiters '|';

the lines of the file themselves are:

4/21/99|859717.0|1.8|63|1|1.0|4.5|75.9|12:27:54|00|1|181.7|8500873.9|715513.1|181.1|8500873.9|71
5513.1|"20L"
4/21/99|859721.0|1.8|63|1|1.0|4.5|75.9|12:27:54|00|0|181.7|8500873.9|715513.1|181.1|8500873.9|71
5513.1|"20L"

etc.

The key problem is that whenever this command is executed I receive a
POSTGRES_FATAL_ERROR from the database and am informed that pg_atoi failed on the L in 20L. I
have already tested replacing the "" around 20L with single quotes and nothing, no difference is
made. The SensorData table itself defines the last column as type text. Oddly enough whenever
I attempt to execute the same command from within psql I have no problems. However when I
attempt to execute psql with a -c command the same error occurs. Is there some way to suppress
this? I am attemting to simplify the act of loading data for my colleagues and the extra hoops
are somewhat undesireable.
Thanks in advance.
Collin Lynch.

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Lundin 1999-08-12 14:45:17 Re: [HACKERS] Crisp text editor [definitely OT]
Previous Message Ansley, Michael 1999-08-12 11:40:07 FW: Query string length

Browse pgsql-interfaces by date

  From Date Subject
Next Message Mark Dzmura 1999-08-12 23:18:35 JDBC query...
Previous Message Hiroki Kataoka 1999-08-12 14:32:51 RE: PgAccess 0.97 - final preview