alibaba / ali-dbhub

已迁移新仓库,此版本将不再维护
8.3k stars 1.29k forks source link

Bug: 查询不同表的相同字段时出现Bug #458

Closed HumanHero closed 1 year ago

HumanHero commented 1 year ago

QQ截图20230630115220

Chat2DB Version

v0.0.0 build 20230616055221

Describe the bug

Postgres 14

course 表 CREATE TABLE course ( id integer 0 null, teacher_id integer 0 null, name character varying(254) 254 null );

teacher 表 CREATE TABLE teacher ( id integer 0 null, name character varying(254) 254 null );

查询 SELECT course.*, teacher.name FROM course JOIN teacher ON course.teacher_id = teacher.id

查询结果 course.name 显示的是 teacher.name 值,其他查询工具执行该语句结果正常,course.name 起别名 course_name 或 teacher.name 起别名 teacher_name 后,显示结果正常。望修复! QQ截图20230630115220 QQ截图20230630115326

Chat2DB-Pro commented 1 year ago

📦 体验 Chat2DB

Chat2DB 已经升级至 2.0.12 版本: 已经迁移到新仓库:https://github.com/chat2db/Chat2DB

2.x新特性

快去新仓库体验吧 Chat2DB 2.0,记得帮点个star额。

DEMO

https://github.com/chat2db/Chat2DB/assets/22975773/79e9dded-375b-44cf-9979-bb7572465a2e