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/04/26 09:55:08 UTC

[GitHub] [shardingsphere] zjcnb opened a new issue, #17118: Cannot be modify schema for PostgreSQL

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

   ### Which version of ShardingSphere did you use?
   
   `master branch`
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   `ShardingSphere-Proxy`
   
   
   ### Expected behavior
   
   `ALTER SCHEMA haha RENAME TO HAHA;` can be execute successful.
    
   ### Actual behavior
   
   ```
   readwrite_splitting_db=> ALTER SCHEMA haha RENAME TO HAHA;
   ERROR:  schema "haha" already exists
   ```
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   
   `PostgreSQL Result:`
   
   ```
   postgres=# select oid,* from pg_catalog.pg_namespace;
     oid  |  oid  |      nspname       | nspowner |               nspacl
   -------+-------+--------------------+----------+-------------------------------------
       99 |    99 | pg_toast           |       10 |
       11 |    11 | pg_catalog         |       10 | {postgres=UC/postgres,=U/postgres}
     2200 |  2200 | public             |       10 | {postgres=UC/postgres,=UC/postgres}
    13391 | 13391 | information_schema |       10 | {postgres=UC/postgres,=U/postgres}
    22015 | 22015 | census             |       10 |
    22016 | 22016 | census1            |       10 |
    22017 | 22017 | census2            |       10 |
    22018 | 22018 | census3            |       10 |
    22019 | 22019 | census5            |       10 |
    22020 | 22020 | census7            |       10 |
    22021 | 22021 | census8            |       10 |
    22022 | 22022 | census9            |       10 |
    22023 | 22023 | census10           |       10 |
    22024 | 22024 | census11           |       10 |
    22025 | 22025 | census12           |       10 |
    22026 | 22026 | census14           |       10 |
    22027 | 22027 | census15           |       10 |
    22028 | 22028 | census16           |       10 |
    22029 | 22029 | census17           |       10 |
    22030 | 22030 | census18           |       10 |
    22031 | 22031 | census19           |       10 |
    22032 | 22032 | census20           |       10 |
    22033 | 22033 | census21           |       10 |
    22034 | 22034 | census22           |       10 |
    22035 | 22035 | census23           |       10 |
    22036 | 22036 | census25           |       10 |
    22037 | 22037 | haha               |       10 |
   (27 rows)
   ```
   
   `Proxy Result:`
   
   ```
   readwrite_splitting_db=> select oid,* from pg_catalog.pg_namespace;
     oid  |      nspname       | nspowner |               nspacl
   -------+--------------------+----------+-------------------------------------
    22037 | haha               | 10       |
    22036 | census25           | 10       |
    22035 | census23           | 10       |
    22034 | census22           | 10       |
    22033 | census21           | 10       |
    22032 | census20           | 10       |
    22031 | census19           | 10       |
    22030 | census18           | 10       |
    22029 | census17           | 10       |
    22028 | census16           | 10       |
    22027 | census15           | 10       |
    22026 | census14           | 10       |
    22025 | census12           | 10       |
    22024 | census11           | 10       |
    22023 | census10           | 10       |
    22022 | census9            | 10       |
    22021 | census8            | 10       |
    22020 | census7            | 10       |
    22019 | census5            | 10       |
    22018 | census3            | 10       |
    22017 | census2            | 10       |
    22016 | census1            | 10       |
    22015 | census             | 10       |
    13391 | information_schema | 10       | {postgres=UC/postgres,=U/postgres}
    2200  | public             | 10       | {postgres=UC/postgres,=UC/postgres}
    11    | pg_catalog         | 10       | {postgres=UC/postgres,=U/postgres}
    99    | pg_toast           | 10       |
   (27 rows)
   ```
   
   


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


[GitHub] [shardingsphere] zjcnb closed issue #17118: Cannot be modify schema for PostgreSQL

Posted by GitBox <gi...@apache.org>.
zjcnb closed issue #17118: Cannot be modify schema for PostgreSQL
URL: https://github.com/apache/shardingsphere/issues/17118


-- 
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] TeslaCN commented on issue #17118: Cannot be modify schema for PostgreSQL

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

   PostgreSQL will convert thing to lower case by default. Try `ALTER SCHEMA haha RENAME TO "HAHA"`;


-- 
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 #17118: Cannot be modify schema for PostgreSQL

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

   > Thank you, i will try it
   
   
   
   > PostgreSQL will convert things to lower case by default. Try `ALTER SCHEMA haha RENAME TO "HAHA";`
   
   Thank you, i will try 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


[GitHub] [shardingsphere] zjcnb commented on issue #17118: Cannot be modify schema for PostgreSQL

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

   > Member
   
   Thank you, i will try 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