running \copy through perl dbi ? - Mailing list pgsql-general

From David Gauthier
Subject running \copy through perl dbi ?
Date
Msg-id CAEs=6DmZLwYre2AF8Li0HgL8AKFG3NwAzGEonLO0TGPk2fsZdg@mail.gmail.com
Whole thread Raw
Responses Re: running \copy through perl dbi ?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: running \copy through perl dbi ?  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: running \copy through perl dbi ?  (Vincent Veyron <vv.lists@wanadoo.fr>)
Re: running \copy through perl dbi ?  (Vincent Veyron <vv.lists@wanadoo.fr>)
Re: running \copy through perl dbi ?  (Vincent Veyron <vincent.veyron@libremen.org>)
List pgsql-general
Hi:

I'm trying to run a PG client side "\copy" command from a perl script.  I tried using $dbh->do("\\copy ...") but it barffed when it saw the '\'...
ERROR:  syntax error at or near "\"

I can do this with a command line approach, attaching to the DB  then run using...
-c "\copy ...".  But I was wondering if there is a more elegant way to do this, maybe some sort of legal SQL command that Perl/DBI would swallow ???

Thanks in Advance !

pgsql-general by date:

Previous
From: Noel Jones
Date:
Subject: Re: Invalid Parent Index Issue Will Not Resolve Despite Multiple Attempts To Fix
Next
From: "David G. Johnston"
Date:
Subject: Re: running \copy through perl dbi ?