pgjdbc/pgjdbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
[pgjdbc/pgjdbc] issue #2932: Unable to set currentSchema via jdbc URL
6+ messages / 3 participants
[nested] [flat]

* [pgjdbc/pgjdbc] issue #2932: Unable to set currentSchema via jdbc URL
@ 2023-07-28 13:39 "bvn13 (@bvn13)" <[email protected]>
  0 siblings, 0 replies; 6+ messages in thread

From: bvn13 (@bvn13) @ 2023-07-28 13:39 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

**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


^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [pgjdbc/pgjdbc] issue #2932: Unable to set currentSchema via jdbc URL
@ 2025-12-05 03:10 ` "YuweiXiao (@YuweiXiao)" <[email protected]>
  4 siblings, 0 replies; 6+ messages in thread

From: YuweiXiao (@YuweiXiao) @ 2025-12-05 03:10 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

+1 in my setup

- driver 42.7.2
- pg version 17 (neon)

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [pgjdbc/pgjdbc] issue #2932: Unable to set currentSchema via jdbc URL
@ 2025-12-05 12:27 ` "davecramer (@davecramer)" <[email protected]>
  4 siblings, 0 replies; 6+ messages in thread

From: davecramer (@davecramer) @ 2025-12-05 12:27 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

 ```
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`

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [pgjdbc/pgjdbc] issue #2932: Unable to set currentSchema via jdbc URL
@ 2025-12-06 12:07 ` "YuweiXiao (@YuweiXiao)" <[email protected]>
  4 siblings, 0 replies; 6+ messages in thread

From: YuweiXiao (@YuweiXiao) @ 2025-12-06 12:07 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

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

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [pgjdbc/pgjdbc] issue #2932: Unable to set currentSchema via jdbc URL
@ 2025-12-07 13:51 ` "davecramer (@davecramer)" <[email protected]>
  4 siblings, 0 replies; 6+ messages in thread

From: davecramer (@davecramer) @ 2025-12-07 13:51 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

Interesting ... is that a bug
@hlinnaka  ?

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [pgjdbc/pgjdbc] issue #2932: Unable to set currentSchema via jdbc URL
@ 2025-12-08 10:37 ` "YuweiXiao (@YuweiXiao)" <[email protected]>
  4 siblings, 0 replies; 6+ messages in thread

From: YuweiXiao (@YuweiXiao) @ 2025-12-08 10:37 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

the related of code for processing startup params

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

^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2025-12-08 10:37 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-07-28 13:39 [pgjdbc/pgjdbc] issue #2932: Unable to set currentSchema via jdbc URL "bvn13 (@bvn13)" <[email protected]>
2025-12-05 03:10 ` "YuweiXiao (@YuweiXiao)" <[email protected]>
2025-12-05 12:27 ` "davecramer (@davecramer)" <[email protected]>
2025-12-06 12:07 ` "YuweiXiao (@YuweiXiao)" <[email protected]>
2025-12-07 13:51 ` "davecramer (@davecramer)" <[email protected]>
2025-12-08 10:37 ` "YuweiXiao (@YuweiXiao)" <[email protected]>

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