Message-ID: From: "qinarmy-zoro (@qinarmy-zoro)" To: "pgjdbc/pgjdbc" Date: Tue, 09 Jun 2026 21:43:52 +0000 Subject: [pgjdbc/pgjdbc] issue #4162: url options=-c%20search_path not work List-Id: X-GitHub-Author-Id: 12522817 X-GitHub-Author-Login: qinarmy-zoro X-GitHub-Issue: 4162 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-State: closed X-GitHub-Type: issue X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/issues/4162 Content-Type: text/plain; charset=utf-8 Please read https://stackoverflow.com/help/minimal-reproducible-example **Describe the issue** A clear and concise description of what the issue is. **Driver Version?** **Java Version?** all **OS Version?** mac os **PostgreSQL Version?** PostgreSQL 18.3 on x86_64-apple-darwin24.6.0, compiled by Apple clang version 17.0.0 (clang-1700.6.3.2), 64-bit **To Reproduce** Steps to reproduce the behaviour: @Test public void upperCase()throws Exception{ String url = "jdbc:postgresql://localhost:5432/postgres?currentSchema=army_types&options=-c%20search_path=army_types,my_stock,public"; Properties properties = new Properties(); properties.put("user","army_w"); properties.put("password","army123"); // properties.put("search_path","my_stock,public,army_types"); try(Connection conn = new Driver().connect(url, properties)){ try(Statement statement = conn.createStatement()){ try(ResultSet resultSet = statement.executeQuery("SELECT current_schema")){ while(resultSet.next()){ System.out.println(resultSet.getString(1)); // out : army_types } } } } } **Expected behaviour** A clear and concise description of what you expected to happen. And what actually happens show search_path ; response below: army_types, my_stock, public **Logs** If possible PostgreSQL logs surrounding the occurrence of the issue Additionally logs from the driver can be obtained adding Using the following template code make sure the bug can be replicated in the driver alone. ``` import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; import java.util.Properties; public class TestNullsFirst { public static void main(String []args) throws Exception { String url = "jdbc:postgresql://localhost:5432/postgres?currentSchema=army_types&options=-c%20search_path=army_types,my_stock,public"; Properties properties = new Properties(); properties.put("user","army_w"); properties.put("password","army123"); // properties.put("search_path","my_stock,public,army_types"); try(Connection conn = new Driver().connect(url, properties)){ try(Statement statement = conn.createStatement()){ try(ResultSet resultSet = statement.executeQuery("SELECT current_schema")){ while(resultSet.next()){ System.out.println(resultSet.getString(1)); // out : army_types } } } } } } ```