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

Backpatch PR 2242 into 42.2: PgDatabaseMetaData.getIndexInfo() cast operands to smallint #2253

Merged
merged 1 commit into from Sep 13, 2021
Merged

Conversation

jsyrjala
Copy link
Contributor

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.

The same change has already merged to master branch: #2242

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

None yet

2 participants