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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]