Closed TianyuZhang1214 closed 5 days ago
psql -h 127.0.0.1 -U mysql
mysql=> create table t (id int, name text, age int);
CREATE TABLE
mysql=> SELECT column_name, data_type, is_nullable
FROM information_schema.columns
WHERE table_name = 't';
column_name | data_type | is_nullable
-------------+-----------+-------------
id | INTEGER | YES
name | VARCHAR | YES
age | INTEGER | YES
mysql=>
Were you running this query on a dirty database? I cannot reproduce it.
psql -h 127.0.0.1 -U mysql mysql=> create table t (id int, name text, age int); CREATE TABLE mysql=> SELECT column_name, data_type, is_nullable FROM information_schema.columns WHERE table_name = 't'; column_name | data_type | is_nullable -------------+-----------+------------- id | INTEGER | YES name | VARCHAR | YES age | INTEGER | YES mysql=>
Were you running this query on a dirty database? I cannot reproduce it.
The description has been updated.
1. Execute the following SQL on PostgreSQL to create a schema and populate a table:
2. Execute the following SQL on DuckDB using
psql
to attach the PostgreSQL database and copy data:3. Query the
information_schema.columns
in DuckDB to inspect the table structure:The output is:
You can find the duplicated columns.