COPY problem

From: Varun Kacholia <varunk(at)cse(dot)iitb(dot)ac(dot)in>
To: pgsql-general(at)postgresql(dot)org
Subject: COPY problem
Date: 2002-06-22 09:47:24
Message-ID: 20020622152005.A10560@voxel.cse.iitb.ac.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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
Why do the people who know the least know it the loudest?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kris 2002-06-22 10:28:33 Obtaining primary key information from the system tables
Previous Message Curt Sampson 2002-06-22 09:23:45 Re: URGENT: Performance tuning