running \copy through perl dbi ?

From: David Gauthier <dfgpostgres(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: running \copy through perl dbi ?
Date: 2023-12-08 15:45:28
Message-ID: CAEs=6DmZLwYre2AF8Li0HgL8AKFG3NwAzGEonLO0TGPk2fsZdg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 !

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2023-12-08 15:56:47 Re: running \copy through perl dbi ?
Previous Message Noel Jones 2023-12-08 15:00:37 Re: Invalid Parent Index Issue Will Not Resolve Despite Multiple Attempts To Fix