On Sep 27, 2011, at 10:55 AM, Chris Withers wrote:
> Hi,
>
> I'm wondering what the recommended incantation of create_engine is in SA
> 0.7.3 if:
>
> - you're using pg_bouncer, and so essentially don't want a pool
for that you use NullPool
> - you have a DSN, eg: 'host=xx dname=xx user=xx password=xx', rather
> than a SA url
Hm is this a pgbouncer thing ? I thought that pgbouncer was transparent.
If you're using the psycopg2 dialect and need to use a form of
psycopg.connect() that isn't the usual set of individual kw arguments, you'd
currently need to use the "creator()" function, where you give us back a new
DBAPI connection:
import psycopg2
def create():
return psycopg2.connect(my_dsn_argument_thing="host=xx;dbname=xx;..")
engine = create_engine("postgresql+psycopg2://", creator=create)
see
http://www.sqlalchemy.org/docs/core/engines.html#custom-dbapi-connect-arguments
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.