COPY problem

Поиск
Список
Период
Сортировка
От Varun Kacholia
Тема COPY problem
Дата
Msg-id 20020622152005.A10560@voxel.cse.iitb.ac.in
обсуждение исходный текст
Ответы Re: COPY problem  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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?


В списке pgsql-general по дате отправления:

Предыдущее
От: "Dave Page"
Дата:
Сообщение: Re: foreign Key problem
Следующее
От: "Kris"
Дата:
Сообщение: Obtaining primary key information from the system tables