-
Notifications
You must be signed in to change notification settings - Fork 419
Document pgbouncer-related prepared statement breakage #214
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
Conversation
.github/ISSUE_TEMPLATE.md
Outdated
@@ -12,6 +12,8 @@ Thank you! | |||
|
|||
* **asyncpg version**: | |||
* **PostgreSQL version**: | |||
* **If you are using a PostgreSQL SaaS, then which, and can you reproduce | |||
the issue with a local PostgreSQL install?**: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe reword this to: "Are you using a PostgreSQL SaaS? If so, which? Can you reproduce the issue with a local postgres install?".
7546abe
to
38d45f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but adding a unittest wouldn't hurt.
END; $$ LANGUAGE plpgsql; | ||
""") | ||
except asyncpg.DuplicatePreparedStatementError as e: | ||
self.assertTrue('pgbouncer' in e.hint) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add else: self.fail('...')
tests/test_prepare.py
Outdated
await self.con.execute(""" | ||
DO $$ BEGIN | ||
RAISE EXCEPTION | ||
'duplicate statement' USING ERRCODE = '26000'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think better change "duplicate statement" to "invalid statement" to not think that this is a copy-paste issue. Or message plays some important role?
Nice hint! |
03adc34
to
c6893e9
Compare
c6893e9
to
746ba37
Compare
Related issues: #121 and #149.