Thread: "20L" not interpreted as text.

"20L" not interpreted as text.

From
"Collin F. Lynch"
Date:
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.