Message-ID: From: "davecramer (@davecramer)" To: "pgjdbc/pgjdbc" Date: Tue, 29 Oct 2024 11:26:05 +0000 Subject: Re: [pgjdbc/pgjdbc] issue #3426: 42.7.4 introduced error when binding java.io.FileInputStream In-Reply-To: References: List-Id: X-GitHub-Author-Login: davecramer X-GitHub-Comment-Id: 2443949595 X-GitHub-Comment-Type: issue_comment X-GitHub-Issue: 3426 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/issues/3426#issuecomment-2443949595 Content-Type: text/plain; charset=utf-8 I cannot replicate this with ``` import java.io.FileInputStream; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; public class TestFileInputStream { public static void main(String[] args) throws Exception { try (Connection con = DriverManager.getConnection( "jdbc:postgresql://localhost/test", "test", "")) { con.createStatement().execute("create temporary table streamtable (bin bytea, str text)"); FileInputStream fis = new FileInputStream("./pom.xml"); try (PreparedStatement pstmt = con.prepareStatement("INSERT INTO streamtable (bin,str) VALUES (?,?)")) { pstmt.setBinaryStream(1, fis); pstmt.setString(2, null); pstmt.executeUpdate(); } } } } ``` Do we have any idea what else is going on ?