Run external SQL file via Perl dbh - Mailing list pgsql-general

From David Williams
Subject Run external SQL file via Perl dbh
Date
Msg-id 8418C16F-C477-496A-A296-1543D9C09DD4@gmail.com
Whole thread Raw
Responses Re: Run external SQL file via Perl dbh
Re: Run external SQL file via Perl dbh
List pgsql-general
Hi There,

I'd like to be able to run the contents of an external SQL file from Perl.  Something akin to:

    $dbh->do( '\i /home/david/run_me.sql' );

However this fails, and I assume that is because the \i is a client command. Is there a way to run the contents of an
externalSQL from a Per database handle? 

Best regards
David

pgsql-general by date:

Previous
From: Aleksander Rozman
Date:
Subject: Re: problem after upgrade db missing
Next
From: Chris Travers
Date:
Subject: Re: Run external SQL file via Perl dbh