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/10/10 06:40:59 UTC

[GitHub] [shardingsphere] strongduanmu opened a new issue, #17204: Consider supporting PostgreSQL/openGauss search path feature

strongduanmu opened a new issue, #17204:
URL: https://github.com/apache/shardingsphere/issues/17204

   ## Feature Request
   
   ### Is your feature request related to a problem?
   
   No.
   
   ### Describe the feature you would like.
   
   After issue #14004 is completed, ShardingSphere has supported SQL such as `CREATE SCHEMA`, `ALTER SCHEMA` and `DROP SCHEMA`, and allows users to specify schema modifiers when executing SQL, such as:
   
   ```sql
   SELECT * FROM test.t_order;
   ```
   
   This SQL will query the data of the t_order table from the test schema.
   
   In order to improve the experience of using PostgreSQL/openGauss schema, we need to support the search_path parameter. Through the `SET SEARCH_PATH TO test, public;` statement, users can dynamically switch the schema without going through schema.t_order. For more detail about search_path, we can refer this doc——https://www.postgresql.org/docs/14/ddl-schemas.html#DDL-SCHEMAS-PATH.
   


-- 
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.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Consider supporting PostgreSQL/openGauss search path feature [shardingsphere]

Posted by "bolyage (via GitHub)" <gi...@apache.org>.
bolyage commented on issue #17204:
URL: https://github.com/apache/shardingsphere/issues/17204#issuecomment-2351651877

   any update?


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


Re: [I] Consider supporting PostgreSQL/openGauss search path feature [shardingsphere]

Posted by "mlmw92 (via GitHub)" <gi...@apache.org>.
mlmw92 commented on issue #17204:
URL: https://github.com/apache/shardingsphere/issues/17204#issuecomment-2603525217

   I found that adding the following code to `PostgreSQLDatabaseMetaData` can solve this problem
   
   ```java
       @Override
       public Optional<String> getDefaultSchema() {
           return this.defaultSchema != null ? Optional.of(this.defaultSchema) : Optional.of("public");
       }
   
       @Override
       public String getSchema(Connection connection) {
           this.defaultSchema = DialectDatabaseMetaData.super.getSchema(connection);
           return this.defaultSchema;
       }
   ```


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


Re: [I] Consider supporting PostgreSQL/openGauss search path feature [shardingsphere]

Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu commented on issue #17204:
URL: https://github.com/apache/shardingsphere/issues/17204#issuecomment-3288060631

   > Hi, is the issue be solved now?I need to use springboot 3.4.1 with shardingshpere 5.5.2. and the database is postgresql, it is blocked by this issue
   
   @Liuxing778 At the moment, this task is not completed, are you interested in completing it?


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


Re: [I] Consider supporting PostgreSQL/openGauss search path feature [shardingsphere]

Posted by "huie2018 (via GitHub)" <gi...@apache.org>.
huie2018 commented on issue #17204:
URL: https://github.com/apache/shardingsphere/issues/17204#issuecomment-2488816795

   Why has it been two years, and it is still not supported


-- 
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] FlyingZC commented on issue #17204: Consider supporting PostgreSQL/openGauss search path feature

Posted by GitBox <gi...@apache.org>.
FlyingZC commented on issue #17204:
URL: https://github.com/apache/shardingsphere/issues/17204#issuecomment-1248892832

   > Hi, i am sort out what needs to be done. @FlyingZC Can you do it with me?
   > 
   > * [ ]  Add search path configuation for server.yaml props
   > * [ ]  Refactor metadata structure
   > * [ ]  Check all schemas are consistent
   > * [ ]  Set search path to jdbc url
   > * [ ]  Refactor get schema logic
   > * [ ]  Clear up session search path
   
   Ok,I'd like to try that.


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


Re: [I] Consider supporting PostgreSQL/openGauss search path feature [shardingsphere]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #17204:
URL: https://github.com/apache/shardingsphere/issues/17204#issuecomment-2026020368

   There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.


-- 
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] strongduanmu commented on issue #17204: Consider supporting PostgreSQL/openGauss search path feature

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #17204:
URL: https://github.com/apache/shardingsphere/issues/17204#issuecomment-1273972544

   This issue is currently low priority, so I will remove milestone.


-- 
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] github-actions[bot] closed issue #17204: Consider supporting PostgreSQL/openGauss search path feature

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #17204: Consider supporting PostgreSQL/openGauss search path feature
URL: https://github.com/apache/shardingsphere/issues/17204


-- 
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] zjcnb commented on issue #17204: Consider supporting PostgreSQL/openGauss search path feature

Posted by GitBox <gi...@apache.org>.
zjcnb commented on issue #17204:
URL: https://github.com/apache/shardingsphere/issues/17204#issuecomment-1119214990

   @strongduanmu Hi,i want to do this. Can you assign me? Thx


-- 
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] strongduanmu commented on issue #17204: Consider supporting PostgreSQL/openGauss search path feature

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #17204:
URL: https://github.com/apache/shardingsphere/issues/17204#issuecomment-1119215676

   @zjcnb Of course. We can consider implementing the global search path first by adding a configuration.


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


Re: [I] Consider supporting PostgreSQL/openGauss search path feature [shardingsphere]

Posted by "Y-sir (via GitHub)" <gi...@apache.org>.
Y-sir commented on issue #17204:
URL: https://github.com/apache/shardingsphere/issues/17204#issuecomment-2273119810

   @zhaojinchao95 @FlyingZC I would like to ask this question, can it be completed in the next version?


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


Re: [I] Consider supporting PostgreSQL/openGauss search path feature [shardingsphere]

Posted by "Liuxing778 (via GitHub)" <gi...@apache.org>.
Liuxing778 commented on issue #17204:
URL: https://github.com/apache/shardingsphere/issues/17204#issuecomment-3288042522

   Hi, is the issue be solved now?I need to use springboot 3.4.1 with shardingshpere 5.5.2. and the database is postgresql, it is blocked by this issue


-- 
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] zhaojinchao95 commented on issue #17204: Consider supporting PostgreSQL/openGauss search path feature

Posted by GitBox <gi...@apache.org>.
zhaojinchao95 commented on issue #17204:
URL: https://github.com/apache/shardingsphere/issues/17204#issuecomment-1248891012

   Hi, i am sort out what needs to be done. @FlyingZC Can you do it with me?
   
   - [ ] Add search path configuation for server.yaml props
   - [ ] Refactor metadata structure
   - [ ] Check all schemas are consistent
   - [ ] Set search path to jdbc url
   - [ ] Refactor get schema logic
   - [ ] Clear up session search path 


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


Re: [I] Consider supporting PostgreSQL/openGauss search path feature [shardingsphere]

Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu commented on issue #17204:
URL: https://github.com/apache/shardingsphere/issues/17204#issuecomment-2489744073

   > Why has it been two years, and it is still not supported
   
   Apparently, no volunteers are interested in implementing this feature. If you are interested in implementing it, feel free to claim it and submit a PR.


-- 
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] github-actions[bot] commented on issue #17204: Consider supporting PostgreSQL/openGauss search path feature

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #17204:
URL: https://github.com/apache/shardingsphere/issues/17204#issuecomment-1272349880

   Hello , this issue has not received a reply for several days.
   This issue is supposed to be closed.


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


Re: [I] Consider supporting PostgreSQL/openGauss search path feature [shardingsphere]

Posted by "LoveYou3000 (via GitHub)" <gi...@apache.org>.
LoveYou3000 commented on issue #17204:
URL: https://github.com/apache/shardingsphere/issues/17204#issuecomment-5112075227

   > getSchema
   
   I think this solution is not an ideal one because adding an attribute to `PostgreSQLDatabaseMetaData` would make it a stateful class. If an instance of this class does not call the `getSchema` method but directly calls the `getDefaultSchema` method, it will not be able to obtain the schema in the connection; instead, it will obtain the default `public` schema.


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