Y-sir commented on issue #29387:
URL:
https://github.com/apache/shardingsphere/issues/29387#issuecomment-1853218937
This is the captured SQL
SELECT
col.table_schema AS SCHEMA_NAME,
col.TABLE_NAME,
col.COLUMN_NAME,
col.character_maximum_length,
col.is_nullable,
col.numeric_precision,
col.numeric_scale,
col.datetime_precision,
col.ordinal_position,
b.atttypmod,
b.attndims,
col.data_type AS col_type,
et.typelem,
et.typlen,
et.typtype,
nbt.nspname AS elem_schema,
bt.typname AS elem_name,
b.atttypid,
col.udt_schema,
col.udt_name,
col.domain_catalog,
col.domain_schema,
col.domain_name,
col_description ( C.oid, col.ordinal_position ) AS COMMENT,
col.column_default AS col_default,
col.is_identity,
col.identity_generation,
col.identity_start,
col.identity_increment,
col.identity_maximum,
col.identity_minimum,
col.identity_cycle,
b.attacl,
colnsp.nspname AS collation_schema_name,
coll.collname,
C.relkind,
b.attfdwoptions AS foreign_options
FROM
information_schema.COLUMNS AS col
LEFT JOIN pg_namespace ns ON ns.nspname = col.table_schema
LEFT JOIN pg_class C ON col.TABLE_NAME = C.relname
AND C.relnamespace = ns.oid
LEFT JOIN pg_attrdef A ON C.oid = A.adrelid
AND col.ordinal_position = A.adnum
LEFT JOIN pg_attribute b ON b.attrelid = C.oid
AND b.attname = col.
COLUMN_NAME LEFT JOIN pg_type et ON et.oid = b.atttypid
LEFT JOIN pg_collation coll ON coll.oid = b.attcollation
LEFT JOIN pg_namespace colnsp ON coll.collnamespace = colnsp.oid
LEFT JOIN pg_type bt ON et.typelem = bt.oid
LEFT JOIN pg_namespace nbt ON bt.typnamespace = nbt.oid
WHERE
col.table_schema = 'public'
AND col.TABLE_NAME = 't10'
ORDER BY
col.table_schema,
col.TABLE_NAME,
col.ordinal_position
You can see that the results returned by the query are all correct.


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