pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Juha Syrjälä <noreply@github.com>
To: pgsql-jdbc@lists.postgresql.org
Subject: [pgjdbc/pgjdbc] 33af6a: PgDatabaseMetaData.getIndexInfo() cast operands to...
Date: Mon, 13 Sep 2021 04:17:23 -0700
Message-ID: <pgjdbc/pgjdbc/push/refs/heads/release/42.2/5c6041-33af6a@github.com> (raw)

  Branch: refs/heads/release/42.2
  Home:   https://github.com/pgjdbc/pgjdbc
  Commit: 33af6a780af0083b382d536c909a20145d5ff195
      https://github.com/pgjdbc/pgjdbc/commit/33af6a780af0083b382d536c909a20145d5ff195
  Author: Juha Syrjälä <juha.syrjala+github@iki.fi>
  Date:   2021-09-13 (Mon, 13 Sep 2021)

  Changed paths:
    M pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java
    M pgjdbc/src/test/java/org/postgresql/test/jdbc2/DatabaseMetaDataTest.java

  Log Message:
  -----------
  PgDatabaseMetaData.getIndexInfo() cast operands to smallint (#2242) (#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







Message-ID: <pgjdbc/pgjdbc/push/refs/heads/release/42.2/5c6041-33af6a@github.com>
Permalink:  ../pgjdbc%2Fpgjdbc%2Fpush%2Frefs%2Fheads%2Frelease%2F42.2%2F5c6041-33af6a@github.com/
Also on:    postgresql.org/message-id/pgjdbc/pgjdbc/push/refs/heads/release/42.2/5c6041-33af6a@github.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: noreply@github.com
  Subject: Re: [pgjdbc/pgjdbc] 33af6a: PgDatabaseMetaData.getIndexInfo() cast operands to...
  In-Reply-To: <pgjdbc/pgjdbc/push/refs/heads/release/42.2/5c6041-33af6a@github.com>
  References: <pgjdbc/pgjdbc/push/refs/heads/release/42.2/5c6041-33af6a@github.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox