-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(contrib/drivers/pgsql): Fixed the problem of overlapping fields in the same table name in pgsql multiple schema mode #4375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a field duplication issue in PostgreSQL multi-schema environments where tables with the same name exist across different schemas. The fix ensures that table field queries are properly scoped to the current schema.
- Adds schema namespace filtering to the PostgreSQL table fields query
- Prevents field aggregation from tables with identical names in different schemas
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
我感觉应该将 正常逻辑表现,应该是按照优先级,返回第一张表的元数据,这和PG的数据查询表现是一致的。 |
|
PR的实现有点问题,search_path多schema设置下,只会返回第一个schema。 如果表出现在第2个schema里,就会查不到。 |
|
如果PR主能看到的话,可以尝试下我的实现,加上单测^_^ |
|
@iamcc30 see see
|
|
我理解的是只会操作当前的scheme,不会有多个scheme一起查询的情况,不知道是否理解有误。 |
不是的,现实中,search_path 很可能配置多个schema。 按照兄台之前的改动,永远只会命中当前schema。而实际情况是根据schema 优先级,命中第一个 |
|
如果你配置多个search_path=user,public (默认),表如果在public下,你的实现就会查不到 |
|
我明白你的意思了 |
No description provided.