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

sql: PGJDBC encounters "SimpleQuery not allowed while in extended protocol mode" #41511

Closed
rafiss opened this issue Oct 10, 2019 · 1 comment · Fixed by #51194
Closed

sql: PGJDBC encounters "SimpleQuery not allowed while in extended protocol mode" #41511

rafiss opened this issue Oct 10, 2019 · 1 comment · Fixed by #51194
Labels
A-sql-pgcompat Semantic compatibility with PostgreSQL A-sql-pgwire pgwire protocol issues. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

Comments

@rafiss
Copy link
Collaborator

rafiss commented Oct 10, 2019

The PGJDBC driver has a test suite in AutoRollbackTestSuite.java.

The following query fails in a lot of the test cases. Note that it fails before any of the rollback logic is tested -- this error happens right at the beginning of the test.

insert into rollbacktest(a, str) values (0, 'test')
org.postgresql.util.PSQLException: ERROR: SimpleQuery not allowed while in extended protocol mode
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2497)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2233)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:310)
        at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:446)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:370)
        at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:311)
        at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:297)
        at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:274)
        at org.postgresql.jdbc.PgStatement.executeUpdate(PgStatement.java:246)
        at org.postgresql.test.jdbc2.AutoRollbackTestSuite.run(AutoRollbackTestSuite.java:240)

could relate to #33693

@rafiss rafiss added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. A-sql-pgcompat Semantic compatibility with PostgreSQL labels Oct 10, 2019
@rafiss rafiss changed the title sql: hibernate encounters "SimpleQuery not allowed while in extended protocol mode" when autoCommit=OFF sql: PGJDBC encounters "SimpleQuery not allowed while in extended protocol mode" when autoCommit=OFF Oct 10, 2019
@rafiss rafiss changed the title sql: PGJDBC encounters "SimpleQuery not allowed while in extended protocol mode" when autoCommit=OFF sql: PGJDBC encounters "SimpleQuery not allowed while in extended protocol mode" Oct 10, 2019
@asubiotto asubiotto added the A-sql-pgwire pgwire protocol issues. label Apr 21, 2020
@perezd
Copy link

perezd commented Jul 1, 2020

I was able to produce this failure condition using Elixir/Postgrex as well in a testing context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-pgcompat Semantic compatibility with PostgreSQL A-sql-pgwire pgwire protocol issues. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants