Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mPjxq-0006Em-QB for pgsql-jdbc@arkaria.postgresql.org; Mon, 13 Sep 2021 11:17:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mPjxo-0000NJ-MP for pgsql-jdbc@arkaria.postgresql.org; Mon, 13 Sep 2021 11:17:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mPjxo-0000N7-E4 for pgsql-jdbc@lists.postgresql.org; Mon, 13 Sep 2021 11:17:28 +0000 Received: from out-21.smtp.github.com ([192.30.252.204] helo=smtp.github.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mPjxl-0007rA-H7 for pgsql-jdbc@lists.postgresql.org; Mon, 13 Sep 2021 11:17:27 +0000 Received: from github.com (hubbernetes-node-d218dd9.ac4-iad.github.net [10.52.205.75]) by smtp.github.com (Postfix) with ESMTPA id 302B2520B27 for ; Mon, 13 Sep 2021 04:17:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1631531843; bh=IoyE50TMDTF0i44G1KSv9OuymhZaIDBQ8tYkAi3TPJQ=; h=Date:From:To:Subject:From; b=mr2UbiGbOrqVRcKutRdHst9oiUvoVhX3b6KWQQdXfJKk8aC1QMgvJHBuAsQEhbn5W lGGrCgG6XCszBEJfR2+Es1gaOH7wlWLzISBJJYzMhgsEkcxkWRa/N8O77uNiM4mwWB TgyLNRSva0oPzMZEGn+EItX8RFzpTS/S0s2q1uhU= Date: Mon, 13 Sep 2021 04:17:23 -0700 From: =?UTF-8?B?SnVoYSBTeXJqw6Rsw6Q=?= To: pgsql-jdbc@lists.postgresql.org Message-ID: Subject: [pgjdbc/pgjdbc] 33af6a: PgDatabaseMetaData.getIndexInfo() cast operands to... Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Approved: 58GruLoMopuc X-GitHub-Recipient-Address: pgsql-jdbc@lists.postgresql.org X-Auto-Response-Suppress: All List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Branch: refs/heads/release/42.2=0D Home: https://github.com/pgjdbc/pgjdbc=0D Commit: 33af6a780af0083b382d536c909a20145d5ff195=0D https://github.com/pgjdbc/pgjdbc/commit/33af6a780af0083b382d536c909= a20145d5ff195=0D Author: Juha Syrj=C3=A4l=C3=A4 =0D Date: 2021-09-13 (Mon, 13 Sep 2021)=0D =0D Changed paths:=0D M pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java=0D= M pgjdbc/src/test/java/org/postgresql/test/jdbc2/DatabaseMetaDataTest= .java=0D =0D Log Message:=0D -----------=0D PgDatabaseMetaData.getIndexInfo() cast operands to smallint (#2242) (#2= 253)=0D =0D It is possible to break method PgDatabaseMetaData.getIndexInfo() by addin= g certain custom operators.=0D This PR casts operands in a query so that PgDatabaseMetaData.getIndexInfo= () works in presence=0D of such operator config.=0D =0D Creating this operator triggers this issue:=0D =0D CREATE OR REPLACE FUNCTION f6(numeric, integer) returns integer as 'BEGIN= return $1::integer & $2;END;' language plpgsql immutable;=0D CREATE OPERATOR & (LEFTARG =3D numeric, RIGHTARG =3D integer, PROCEDURE =3D= f6);=0D =0D Fixes #2241=0D =0D =0D