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

Fix #303: Support creating and dropping a PostgreSQL database when using pg8000 driver #356

Conversation

mohaseeb
Copy link
Contributor

@mohaseeb mohaseeb commented Jan 10, 2019

As reported by #303 current implementation of create_database/drop_database doesn't support creating/dropping a PostgreSQL database when connecting using pg8000 driver. The reason is when pg8000 driver is used (i.e. when the drivername is postgresql+pg8000), create_database/drop_database doesn't set the isolation level needed to execute the 'create database'/'drop database' command on PostgreSQL. This PR is fixing that.

  • Commits 5dec6f2 and ebd6b10 add a TC that tests creating a PostgreSQL DB using pg8000. Only the TC without the fix was added first so the travis-ci job fails to reproduce the error (see the TC failure here).
  • The following commit adds support to create a PostgreSQL DB using pg8000.
  • Commit 49ba768 extends the tests to test dropping a PostgreSQL DB using pg8000. The TC fails as intended to reproduce the error as can be seen here.
  • The following commit adds support to drop a PostgreSQL DB using pg8000.

@mohaseeb mohaseeb changed the title Fix 303: Support creating a PostgreSQL database when using pg8000 driver IN PROGRESS!!! Fix 303: Support creating a PostgreSQL database when using pg8000 driver Jan 10, 2019
@mohaseeb mohaseeb changed the title IN PROGRESS!!! Fix 303: Support creating a PostgreSQL database when using pg8000 driver Fix 303: Support creating a PostgreSQL database when using pg8000 driver Jan 10, 2019
@mohaseeb mohaseeb changed the title Fix 303: Support creating a PostgreSQL database when using pg8000 driver Fix #303: Support creating a PostgreSQL database when using pg8000 driver Jan 10, 2019
@mohaseeb mohaseeb changed the title Fix #303: Support creating a PostgreSQL database when using pg8000 driver Fix #303: Support creating and dropping a PostgreSQL database when using pg8000 driver Jan 12, 2019
@mohaseeb
Copy link
Contributor Author

@kvesteri this PR is ready for review, please have a look when possible. Thanks!

@kvesteri kvesteri merged commit a10edde into kvesteri:master Jan 13, 2019
@kvesteri
Copy link
Owner

Thanks for the PR! 🚋

@mohaseeb mohaseeb deleted the fix303_support_PostgreSQL_pg8000_on_create_database branch January 13, 2019 20:07
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

Successfully merging this pull request may close these issues.

None yet

2 participants