| From: | ann hedley <ann(dot)hedley(at)ed(dot)ac(dot)uk> |
|---|---|
| To: | pgsql-novice(at)postgresql(dot)org |
| Subject: | perl DBI::Pg metacharacter \i com_list.sql |
| Date: | 2005-09-29 13:14:41 |
| Message-ID: | 433BE8C1.40302@ed.ac.uk |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
Hi
in pgsql I can execute a list of sql commands from a text file using ...
lumbribasetest=# \i comm_list.sql
but in a perl script using DBI and the syntax...
$com = $conn->prepare("\i comm_list.sql");
$com->execute() or die $com->errstr;
I get the following error
DBD::Pg::st execute failed: ERROR: parser: parse error at or near
"i" at character 1 at /home/ann/bin/pg_go2slim.pl line 85.
ERROR: parser: parse error at or near "i" at character 1 at
/home/ann/bin/pg_go2slim.pl line 85.
Anyone know what the syntax should be?
Thanks in advance
--
Ann
"In a world without walls and fences - who needs Windows and Gates ?"
(unknown)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Obe, Regina DND\MIS | 2005-09-29 13:30:17 | Re: Query in SQL statement |
| Previous Message | shadowbox | 2005-09-29 03:14:51 | Re: stored procedure problem: parameters not properly passed |