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 1mPi8r-0001nU-VR for pgsql-jdbc@arkaria.postgresql.org; Mon, 13 Sep 2021 09:20:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mPi8q-0002l8-Oa for pgsql-jdbc@arkaria.postgresql.org; Mon, 13 Sep 2021 09:20:44 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mPi8q-0002l0-H6 for pgsql-jdbc@lists.postgresql.org; Mon, 13 Sep 2021 09:20:44 +0000 Received: from out-21.smtp.github.com ([192.30.252.204] helo=smtp.github.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mPi8o-0001Yz-5v for pgsql-jdbc@lists.postgresql.org; Mon, 13 Sep 2021 09:20:43 +0000 Received: from github.com (hubbernetes-node-f722d23.ac4-iad.github.net [10.52.208.43]) by smtp.github.com (Postfix) with ESMTPA id 0B8075203F7 for ; Mon, 13 Sep 2021 02:20:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1631524841; bh=IOz28D1zs9ZUpIY8sTscHDiA1ocq015Lpl4VvzbdO2g=; h=Date:From:To:Subject:From; b=CJNViKWpLOJThHuuSscu3u6eNS17Ge0AlTdHDLLVfs0q1UOG0dHNme/u+g+i6mxBd gfB8Y7z/qgwMd6R5yiDKc2TcFkgQbtGlkiITlgYJZqWASzLzBYalSC7bZKqQwEHH/W Qr/n4Rgi+ThnIUYfMvwSu9B0Xo8gwaQaQnYEO4SM= Date: Mon, 13 Sep 2021 02:20:41 -0700 From: =?UTF-8?B?SnVoYSBTeXJqw6Rsw6Q=?= To: pgsql-jdbc@lists.postgresql.org Message-ID: Subject: [pgjdbc/pgjdbc] 3a2bbd: 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/master=0D Home: https://github.com/pgjdbc/pgjdbc=0D Commit: 3a2bbd77969903f8a4ce721d45905c72bd1688d6=0D https://github.com/pgjdbc/pgjdbc/commit/3a2bbd77969903f8a4ce721d459= 05c72bd1688d6=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)=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