--- a/pgtoolkit/pgmanager.py Mon Mar 04 15:39:34 2013 +0100
+++ b/pgtoolkit/pgmanager.py Tue Mar 05 11:24:47 2013 +0100
@@ -7,7 +7,7 @@
# Part of pgtoolkit
# http://hg.devl.cz/pgtoolkit
#
-# Copyright (c) 2010, 2011, 2012 Radek Brich <radek.brich@devl.cz>
+# Copyright (c) 2010, 2011, 2012, 2013 Radek Brich <radek.brich@devl.cz>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +29,7 @@
"""Postgres database connection manager
-PgManager wraps psycopg2 connect function, adding following features:
+PgManager wraps psycopg2, adding following features:
* Save and reuse database connection parameters
@@ -41,7 +41,7 @@
Example usage:
- import pgmanager
+ from pgtoolkit import pgmanager
pgm = pgmanager.get_instance()
pgm.create_conn(hostaddr='127.0.0.1', dbname='postgres')
@@ -474,6 +474,7 @@
if ci.init_statement:
curs = conn.cursor()
curs.execute(ci.init_statement)
+ curs.connection.commit()
curs.close()
return conn