fix: PostgreSQL数据源创建数据集时,获取的表字段多了一个,导致刷新数据失败

This commit is contained in:
taojinlong 2024-07-24 18:02:07 +08:00
parent 54a3ab9772
commit 1231d5010f

View File

@ -629,13 +629,13 @@ public class CalciteProvider extends Provider {
" JOIN pg_attribute a ON a.attrelid = c.oid\n" +
" LEFT JOIN pg_description b ON a.attrelid = b.objoid AND a.attnum = b.objsubid\n" +
" JOIN pg_type t ON a.atttypid = t.oid\n" +
"WHERE\n" +
" c.relname = '%s'\n" +
"where\n" +
" \tc.relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = '%s') \n" +
" AND c.relname = '%s'\n" +
" AND a.attnum > 0\n" +
" AND NOT a.attisdropped\n" +
"ORDER BY\n" +
" a.attnum\n" +
" ", datasourceRequest.getTable());
" a.attnum;", configuration.getSchema(), datasourceRequest.getTable());
break;
case redshift:
configuration = JsonUtil.parseObject(datasourceRequest.getDatasource().getConfiguration(), CK.class);