Skip to content

Recognize CrDB invalid-cached-query errors, not just PG ones - #1408

Open
charles-dyfis-net wants to merge 1 commit into
MagicStack:masterfrom
charles-dyfis-net:crdb-recognize-invalid-cached-queries
Open

charles-dyfis-net wants to merge 1 commit into
MagicStack:masterfrom
charles-dyfis-net:crdb-recognize-invalid-cached-queries

Conversation

@charles-dyfis-net

Copy link
Copy Markdown

CockroachDB returns "cached plan must not change result type" with SQLSTATE 0A000 but without the server_source_function matched to recognize this same error when returned from PostgreSQL.

This has resulted in FeatureNotSupportedError being raised instead of the intended InvalidCachedStatementError; without the correct error message, SQLAlchemy can't discard invalidated statement cache entries.

CockroachDB returns "cached plan must not change result type" with SQLSTATE 0A000 but _without_ the `server_source_function` matched to recognize this same error when returned from PostgreSQL.

This has resulted in `FeatureNotSupportedError` being raised instead of the intended `InvalidCachedStatementError`; without the correct error message, SQLAlchemy can't discard invalidated statement cache entries.

This branch has not been deployed

No deployments
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.

1 participant