COPY from perl - Mailing list pgsql-interfaces

From Varun Kacholia
Subject COPY from perl
Date
Msg-id 20020622182404.A17401@voxel.cse.iitb.ac.in
Whole thread Raw
List pgsql-interfaces
hi, I am using the Pg.pm module to interact with the db from perl.
Using it i am facing a wierd problem in using the "COPY from" command.
The command works when used from the psql prompt but gives the following
error when called using perl.
ERROR:  parser: parse error at or near ".9"

This rules the possibility that it is unable to open the file or something
like that.As far as parsing goes , shudnt it be same when called from 
the psql prompt and  perl.

A sample line from the file
1<tab>192.168.9.65<tab>485171<tab>/lib/<tab>ld-2.2.5.so<tab>15<tab>Sep 4 2001    0<tab>1<tab>word\n
(where tab is replaced by actual <tab>)

the table looks like is :
int2   varchar         int        varchar      varchar      int2    varchar     int2  int2  varchar
(for the respective fields above)

the call from perl looks like
$result=$conn->exec("COPY dbmisc FROM \'/copypages/filename\'");

I think it is giving error in parsing "192.168.9.65" .
Cant understand y this error is not given when called from psql prompt?
I am using the pgsql-7.2 (from redhat 7.3) with Redhat 7.2 (is it due to this?).
Please help

-- 
------
Varun Computers make very fast, very accurate mistakes. 



pgsql-interfaces by date:

Previous
From: Satoshi Nagayasu
Date:
Subject: libpq for PalmOS (I need help)
Next
From: Sascha Bohnenkamp
Date:
Subject: unsubscribe