apache / shardingsphere

Empowering Data Intelligence with Distributed SQL for Sharding, Scalability, and Security Across All Databases.
Apache License 2.0
20.02k stars 6.77k forks source link

Consider supporting PostgreSQL/openGauss search path feature #17204

Open strongduanmu opened 2 years ago

strongduanmu commented 2 years ago

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:

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.

zhaojinchao95 commented 2 years ago

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

strongduanmu commented 2 years ago

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

zhaojinchao95 commented 2 years ago

Hi, i am sort out what needs to be done. @FlyingZC Can you do it with me?

FlyingZC commented 2 years ago

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.

github-actions[bot] commented 2 years ago

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

strongduanmu commented 2 years ago

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

github-actions[bot] commented 8 months ago

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

Y-sir commented 3 months ago

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

bolyage commented 2 months ago

any update?

huie2018 commented 2 weeks ago

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

strongduanmu commented 2 weeks ago

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.