On Friday 16 January 2009 10:09:06 pm johnf wrote:
I'm using python and can execute standard select,update,delete,functions.
What I'd like to do is execute a sql script (a text file). But I don't
know how?
Some thing like:
import psycopg2
import psycopg2.extensions
conn =
On Saturday 17 January 2009 07:14:06 am Adrian Klaver wrote:
On Friday 16 January 2009 10:09:06 pm johnf wrote:
I'm using python and can execute standard
select,update,delete,functions. What I'd like to do is execute a sql
script (a text file). But I don't know how?
Some thing like:
On Fri, 2009-01-16 at 22:09 -0800, johnf wrote:
I'm using python and can execute standard select,update,delete,functions.
What I'd like to do is execute a sql script (a text file). But I don't know
how?
You need to open the text file and pass it as an argument:
try:
file = %s/%s %
I'm using python and can execute standard select,update,delete,functions.
What I'd like to do is execute a sql script (a text file). But I don't know
how?
Some thing like:
import psycopg2
import psycopg2.extensions
conn = psycopg2.connect(host=%s dbname=%s user =%s password
=%s