Run external SQL file via Perl dbh

Поиск
Список
Период
Сортировка
От David Williams
Тема Run external SQL file via Perl dbh
Дата
Msg-id 8418C16F-C477-496A-A296-1543D9C09DD4@gmail.com
обсуждение исходный текст
Ответы Re: Run external SQL file via Perl dbh  (Chris Travers <chris.travers@gmail.com>)
Re: Run external SQL file via Perl dbh  (Toby Corkindale <toby.corkindale@strategicdata.com.au>)
Список 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 по дате отправления:

Предыдущее
От: Aleksander Rozman
Дата:
Сообщение: Re: problem after upgrade db missing
Следующее
От: Chris Travers
Дата:
Сообщение: Re: Run external SQL file via Perl dbh