Skip to content

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

Merged
merged 1 commit into from
Oct 25, 2017

Conversation

elprans
Copy link
Member

@elprans elprans commented Oct 23, 2017

Related issues: #121 and #149.

@elprans elprans requested a review from 1st1 October 23, 2017 18:54
@@ -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?**:
Copy link
Member

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?".

@elprans elprans force-pushed the document-pgbouncer branch from 7546abe to 38d45f2 Compare October 23, 2017 19:11
Copy link
Member

@1st1 1st1 left a 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)
Copy link
Member

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('...')

await self.con.execute("""
DO $$ BEGIN
RAISE EXCEPTION
'duplicate statement' USING ERRCODE = '26000';
Copy link

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?

@kxepal
Copy link

kxepal commented Oct 23, 2017

Nice hint!

@elprans elprans force-pushed the document-pgbouncer branch 3 times, most recently from 03adc34 to c6893e9 Compare October 24, 2017 16:09
@elprans elprans force-pushed the document-pgbouncer branch from c6893e9 to 746ba37 Compare October 24, 2017 16:10
@elprans elprans merged commit 4a3713f into master Oct 25, 2017
@elprans elprans deleted the document-pgbouncer branch October 25, 2017 03:10
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.

3 participants