Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pg8000 support for create_database #303

Closed
alecbz opened this issue Jan 23, 2018 · 0 comments
Closed

pg8000 support for create_database #303

alecbz opened this issue Jan 23, 2018 · 0 comments

Comments

@alecbz
Copy link

alecbz commented Jan 23, 2018

create_database has a check for engine.driver == 'psycopg2', which it then uses to enable autocommit for the engine, which (AFAIK) avoids an error about trying to issue CREATE DATABASE from within a transaction. Something similar (see zzzeek/sqlalchemy#88) needs to be done for pg8000 to avoid the same issue.

https://github.com/kvesteri/sqlalchemy-utils/blob/master/sqlalchemy_utils/functions/database.py#L540

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant