You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "JiekerTime (via GitHub)" <gi...@apache.org> on 2023/03/30 03:18:56 UTC

[GitHub] [shardingsphere] JiekerTime opened a new issue, #24899: The \d&&\d tableName syntax may have problems with the connections created

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

   My resources config and query sql is as follows:
   <img width="1656" alt="image" src="https://user-images.githubusercontent.com/76552510/228719224-5382ae2e-7d1a-47bb-a7cc-afa4be79ba72.png">
   Got result like follows:
   <img width="331" alt="image" src="https://user-images.githubusercontent.com/76552510/228719407-facff2fd-a518-4017-ac36-e0f842b90ffa.png">
   acutally, data like follows:
   <img width="713" alt="image" src="https://user-images.githubusercontent.com/76552510/228719535-8583ecab-a25b-47a6-9c41-dc3827abdde0.png">
   
   When I debug , Found that there seems to be a problem with the connected database
   ![image](https://user-images.githubusercontent.com/76552510/228718944-b1cca894-fcf0-4335-b94b-c65746d056b3.png)
   
   
   I will try to fix it, if someone wanna do me a favour,  that would be great.
   


-- 
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] JiekerTime closed issue #24899: The fact that the \d&&\d tableName syntax is not yet supported.

Posted by "JiekerTime (via GitHub)" <gi...@apache.org>.
JiekerTime closed issue #24899: The fact that the \d&&\d tableName syntax is not yet supported.
URL: https://github.com/apache/shardingsphere/issues/24899


-- 
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] JiekerTime commented on issue #24899: The fact that the \d&&\d tableName syntax is not yet supported.

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

   The context is understood, I will try to support \d tableName and try to support singleton mode.


-- 
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 #24899: The fact that the \d&&\d tableName syntax is not yet supported.

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

   You can take a look at sys_data, the actual data is stored in sys_data znode.


-- 
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 #24899: The fact that the \d&&\d tableName syntax is not yet supported.

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

   > All the data should come from ShardingSphereDatabase.schemas.
   
   ShardingSphereDatabase.schemas only contains table metadata, the actual data of pg_class and pg_namespace are stored in sys_data znode. These data were collected from native postgresql via a timed task, performed every 30s.
   


-- 
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] JiekerTime commented on issue #24899: The fact that the \d&&\d tableName syntax is not yet supported.

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

   
   
   
   
   > You can take a look at sys_data, the actual data is stored in sys_data znode.
   
   All the data should come from ShardingSphereDatabase.schemas.
   
   Whether it's a singleton or distributed scenario, I only see that we only have the table structure and not its data, so \d and \d table can't query the data.
   
   I understand that \d and \d tablename are just syntactic sugar, the real syntax of which is as follows respectively:
   ```
   SELECT n.nspname as "Schema",
     c.relname as "Name",
     CASE c.relkind WHEN 'r' THEN 'table' WHEN 'v' THEN 'view' WHEN 'i' THEN 'index' WHEN 'I' THEN 'global partition index' WHEN 'S' THEN 'sequence' WHEN 'L' THEN 'large sequence' WHEN 'f' THEN 'foreign table' WHEN 'm' THEN 'materialized view'  WHEN 'e' THEN 'stream' WHEN 'o' THEN 'contview' END as "Type",
     pg_catalog.pg_get_userbyid(c.relowner) as "Owner",
     c.reloptions as "Storage"
   FROM pg_catalog.pg_class c
        LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
   WHERE c.relkind IN ('r','v','m','S','L','f','e','o','')
         AND n.nspname <> 'pg_catalog'
         AND n.nspname <> 'db4ai'
         AND n.nspname <> 'information_schema'
         AND n.nspname !~ '^pg_toast'
         AND c.relname not like 'matviewmap\_%'
         AND c.relname not like 'mlog\_%'
     AND pg_catalog.pg_table_is_visible(c.oid)
   ORDER BY 1,2;
   ```
   ```
   SELECT c.oid,
     n.nspname,
     c.relname
   FROM pg_catalog.pg_class c
        LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
   WHERE c.relname ~ '^(test)$'
     AND pg_catalog.pg_table_is_visible(c.oid)
   ORDER BY 2, 3;
   ```
   
   I tried syntax `REFRESH TABLE METADATA;` and also waited for a while, which did not make the data populate.
   
   But I can query data by `SHOW TABLE METADATA t_order`


-- 
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 #24899: The fact that the \d&&\d tableName syntax is not yet supported.

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

   Moreover, this feature is only supported on the Proxy adaptor and requires cluster mode. 
   


-- 
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] JiekerTime commented on issue #24899: The fact that the \d&&\d tableName syntax is not yet supported.

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

   > Hi @JiekerTime , currently cluster mode can support `\d` , excluding `\d tableName`
   
   singleton couldn't support yet?


-- 
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] RaigorJiang commented on issue #24899: The fact that the \d&&\d tableName syntax is not yet supported.

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

   Hi @JiekerTime , currently cluster mode can support `\d` , excluding `\d tableName`


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