Currently, there are no handling about named schemas.
I think some commands in spanner-cli that target schema objects need to be extended to support named schemas.
Let's take the SHOW TABLES command as an example.
The current behavior:
SHOW TABLES; shows tables only in the default schema.
The proposed behavior:
- (preserving the current behavior)
SHOW TABLES; shows tables only in the default schema.
SHOW TABLES <schema>; shows tables only in the schema named schema.
Another considerations
SHOW USER TABLES; shows tables in all user generated schemas(without INFORMATION_SCHEMA, SPANNER_SYS. SCHEMA_OWNER != "spanner_system").
SHOW SYSTEM TABLES; shows tables in all system generated schemas(SCHEMA_OWNER = "spanner_system").
SHOW ALL TABLES; shows tables in all schemas(USER + SYSTEM).
SHOW SCHEMAS; shows all schemas.
SHOW SCHEMATA may not be user friendly.
Currently, there are no handling about named schemas.
I think some commands in spanner-cli that target schema objects need to be extended to support named schemas.
Let's take the
SHOW TABLEScommand as an example.The current behavior:
SHOW TABLES;shows tables only in the default schema.The proposed behavior:
SHOW TABLES;shows tables only in the default schema.SHOW TABLES <schema>;shows tables only in the schema namedschema.Another considerations
SHOW USER TABLES;shows tables in all user generated schemas(withoutINFORMATION_SCHEMA,SPANNER_SYS.SCHEMA_OWNER != "spanner_system").SHOW SYSTEM TABLES;shows tables in all system generated schemas(SCHEMA_OWNER = "spanner_system").SHOW ALL TABLES;shows tables in all schemas(USER + SYSTEM).SHOW SCHEMAS;shows all schemas.SHOW SCHEMATAmay not be user friendly.