PostgreSQL有两种char类型:`character`和`"char"`: https://www.postgresql.org/docs/current/datatype-character.html. `pg_class`里的`relkind`是`"char"`类型,所以`GetColumns`这里应该转成`::"char"`或者和本PR里请求的一样去掉转换。这样对于PostgreSQL以及其他兼容PostgreSQL的数据库容错性更好,在做比较时它们通常都会被隐式转换。 ```sql postgres=# select pg_typeof(relkind), pg_typeof('a'::char), pg_typeof('a'::"char") from pg_class limit 1; pg_typeof | pg_typeof | pg_typeof -----------+-----------+----------- "char" | character | "char" (1 row) ``` Co-authored-by: August <pin@singularity-data.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-on: https://gitea.com/xorm/xorm/pulls/2278 Co-authored-by: flyingpigge <flyingpigge@noreply.gitea.com> Co-committed-by: flyingpigge <flyingpigge@noreply.gitea.com> |
||
|---|---|---|
| .. | ||
| dameng.go | ||
| dialect.go | ||
| driver.go | ||
| filter.go | ||
| filter_test.go | ||
| gen_reserved.sh | ||
| mssql.go | ||
| mssql_test.go | ||
| mysql.go | ||
| oracle.go | ||
| oracle_test.go | ||
| pg_reserved.txt | ||
| postgres.go | ||
| postgres_test.go | ||
| quote.go | ||
| sqlite3.go | ||
| sqlite3_test.go | ||
| table_name.go | ||
| table_name_test.go | ||
| time.go | ||