You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/03/24 03:35:06 UTC
[GitHub] [shardingsphere] strongduanmu opened a new issue #16324: Schema 'public' doesn't exist when execute sql with PostgreSQL public schema
strongduanmu opened a new issue #16324:
URL: https://github.com/apache/shardingsphere/issues/16324
## Bug Report
### Which version of ShardingSphere did you use?
https://github.com/apache/shardingsphere/commit/d71cac1c6d43eeda8906469ac504226416ceb14c
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy
### Expected behavior
Execute sql `SELECT * FROM public.t_single;` successfully.
### Actual behavior
```
readwrite_splitting_db=> SELECT * FROM public.t_single;
ERROR: Schema 'public' doesn't exist.
```
### Reason analyze (If you can)
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
Config readwrite-splitting rule:
```yaml
schemaName: readwrite_splitting_db
dataSources:
primary_ds:
url: jdbc:postgresql://127.0.0.1:5432/demo_primary_ds?currentSchema=public
username: postgres
password: 123456
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
replica_ds_0:
url: jdbc:postgresql://127.0.0.1:5432/demo_primary_ds?currentSchema=public
username: postgres
password: 123456
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
replica_ds_1:
url: jdbc:postgresql://127.0.0.1:5432/demo_primary_ds
username: postgres
password: 123456
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
rules:
- !READWRITE_SPLITTING
dataSources:
readwrite_ds:
type: Static
props:
write-data-source-name: primary_ds
read-data-source-names: replica_ds_0,replica_ds_1
```
Create table `t_single`:
```sql
CREATE TABLE t_single (
id INT PRIMARY KEY,
content VARCHAR(255) NOT NULL
);
```
Then execute sql `SELECT * FROM public.t_single;`
### Example codes for reproduce this issue (such as a github link).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] tristaZero closed issue #16324: Schema 'public' doesn't exist when execute sql with PostgreSQL public schema
Posted by GitBox <gi...@apache.org>.
tristaZero closed issue #16324:
URL: https://github.com/apache/shardingsphere/issues/16324
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org