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
PgDatabaseMetaData.getIndexInfo() cast operands to smallint #2242
PgDatabaseMetaData.getIndexInfo() cast operands to smallint #2242
Conversation
adding an operator like this to the test cases would be useful |
What would be the right place to add the test case? There are several DatabaseMetaDataTest classes. Only one of those calling
|
it's pretty fundamental so jdbc2 is fine. |
It is possible to break method PgDatabaseMetaData.getIndexInfo() by adding certain custom operators. This PR casts operands in a query so that PgDatabaseMetaData.getIndexInfo() works in presence of such operator config. Creating this operator triggers this issue: CREATE OR REPLACE FUNCTION f6(numeric, integer) returns integer as 'BEGIN return $1::integer & $2;END;' language plpgsql immutable; CREATE OPERATOR & (LEFTARG = numeric, RIGHTARG = integer, PROCEDURE = f6); Fixes #2241
Added the operator creation to |
Thx! |
I guess this PR is now directed against upcoming 43.x development version? Would it possible get this fix also to 42.2.x? |
yes, of course |
Should I do an another PR with the same content against |
Yes, please |
…2253) It is possible to break method PgDatabaseMetaData.getIndexInfo() by adding certain custom operators. This PR casts operands in a query so that PgDatabaseMetaData.getIndexInfo() works in presence of such operator config. Creating this operator triggers this issue: CREATE OR REPLACE FUNCTION f6(numeric, integer) returns integer as 'BEGIN return $1::integer & $2;END;' language plpgsql immutable; CREATE OPERATOR & (LEFTARG = numeric, RIGHTARG = integer, PROCEDURE = f6); Fixes #2241
It is possible to break method PgDatabaseMetaData.getIndexInfo() by adding certain custom operators.
This PR casts operands in a query so that PgDatabaseMetaData.getIndexInfo() works in presence
of such operator config.
Creating this operator triggers this issue:
Fixes #2241
All Submissions:
Changes to Existing Features: