Subject: [pgjdbc/pgjdbc] issue #2932: Unable to set currentSchema via jdbc URL

From: "bvn13 (@bvn13)" <[email-masked]>
Date: Fri, 28 Jul 2023 13:39:07 +0000

**Describe the issue**
When I specify currentSchema into connection URL it does not applies.

**Driver Version?** 
42.4.3 - tested
42.5.2 - tested
42.6.0 - tested

**Java Version?**
17

**OS Version?**
linux, macOs

**PostgreSQL Version?**
14

---

From: "YuweiXiao (@YuweiXiao)" <[email-masked]>
Date: Fri, 05 Dec 2025 03:10:13 +0000

+1 in my setup

- driver 42.7.2
- pg version 17 (neon)

---

From: "davecramer (@davecramer)" <[email-masked]>
Date: Fri, 05 Dec 2025 12:27:10 +0000

```
static final String DB_URL = "jdbc:postgresql://localhost:5432/test"; // TODO set DB URL here
 try (Connection connection = DriverManager.getConnection(DB_URL+"?currentSchema=foo", DB_USERNAME, DB_PASSWORD)) {
            try (Statement statement = connection.createStatement()) {
                try (ResultSet resultSet = statement.executeQuery("select current_schema()" )) {
                    resultSet.next();
                    System.out.println("Current schema: " + resultSet.getString(1)); // foo
                }
            }

```

prints 
`Current schema: foo`

---

From: "YuweiXiao (@YuweiXiao)" <[email-masked]>
Date: Sat, 06 Dec 2025 12:07:13 +0000

I found it is caused by Neon proxy, which drops the search_path start up params. Direct connection to pg should work.

---

From: "davecramer (@davecramer)" <[email-masked]>
Date: Sun, 07 Dec 2025 13:51:56 +0000

Interesting ... is that a bug
@hlinnaka  ?

---

From: "YuweiXiao (@YuweiXiao)" <[email-masked]>
Date: Mon, 08 Dec 2025 10:37:04 +0000

the related of code for processing startup params

https://github.com/neondatabase/neon/blob/main/proxy/src/compute/mod.rs#L216