shardingsphere icon indicating copy to clipboard operation
shardingsphere copied to clipboard

How to define sharding rules for a given schema?

Open JamesRTaylor opened this issue 1 year ago • 1 comments

Question

I've seen your documentation here on how to define sharding rules for a schema, but I can't seem to find any example in your project that does this. What yaml file is schemaName allowed to be defined in? Is there a unit test or example that you can point me toward? I'm using 5.5.1-SNAPSHOT. Is the functionality described in your documentation still supported?

Thanks for the help!

JamesRTaylor avatar Jun 12 '24 00:06 JamesRTaylor

Hi @JamesRTaylor, the schemaName configuration has been adjusted to databaseName in version 5.x. If you want to use the PostgreSQL schema, you can directly use the CREATE SCHEMA statement and specify the schema prefix in SQL, for example: SELECT * FROM schema.t_order. In addition, please note that ShardingSphere currently does not support the SET SEARCH_PATH statement and can only be switched by specifying the schema in SQL.

strongduanmu avatar Jun 12 '24 00:06 strongduanmu

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

github-actions[bot] avatar Jul 12 '24 20:07 github-actions[bot]