From: | Varun Kacholia <varunk(at)cse(dot)iitb(dot)ac(dot)in> |
---|---|
To: | pgsql-interfaces(at)postgresql(dot)org |
Subject: | COPY from perl |
Date: | 2002-06-22 12:51:22 |
Message-ID: | 20020622182404.A17401@voxel.cse.iitb.ac.in |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Sascha Bohnenkamp | 2002-06-24 06:16:08 | unsubscribe |
Previous Message | Satoshi Nagayasu | 2002-06-21 12:30:53 | libpq for PalmOS (I need help) |