pgjdbc/pgjdbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feedFrom: qinarmy-zoro (@qinarmy-zoro) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: [pgjdbc/pgjdbc] issue #4162: url options=-c%20search_path not work
Date: Tue, 09 Jun 2026 21:43:52 +0000
Message-ID: <[email protected]> (raw)
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
}
}
}
}
}
}
```
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 using the --to and --cc options:
reply via email
To: github://pgjdbc/pgjdbc
Cc: [email protected], [email protected]
Subject: Re: [pgjdbc/pgjdbc] issue #4162: url options=-c%20search_path not work
In-Reply-To: <<[email protected]>>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox