Commit adddc42
committed
fix(odc): use double-quote identifier quoting for PG-family queryTableOrViewData
Previously the PG-family branch in ConnectConsoleService.queryTableOrViewData
reused MySQLSqlBuilder, which wraps identifiers with back-ticks (`schema`.`table`).
openGauss / GaussDB / PostgreSQL reject back-ticks and return SQLState=42601
syntax error at or near "`" when a user clicks the table 'Data' tab.
Switch the PG-family branch to OracleSqlBuilder, whose identifier() wraps with
ASCII double quotes ("schema"."table"), which is the canonical PostgreSQL
identifier-quoting style. Only identifier() / schemaPrefixIfNotBlank() are used
in this code path; OracleSqlBuilder's other Oracle-specific behaviors
(value quoting, default values, LIKE ESCAPE) are not invoked here, so the reuse
is safe.
Fixes actiontech/dms-ee#8651 parent ea725c5 commit adddc42
1 file changed
Lines changed: 11 additions & 4 deletions
File tree
- server/odc-service/src/main/java/com/oceanbase/odc/service/session
Lines changed: 11 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
192 | 199 | | |
193 | 200 | | |
194 | 201 | | |
| |||
0 commit comments