Quote PostgreSQL schema/table identifiers in metadata-derived SQL names#948
Quote PostgreSQL schema/table identifiers in metadata-derived SQL names#948thadguidry with Copilot wants to merge 4 commits into
Conversation
Agent-Logs-Url: https://github.com/9tigerio/db2rest/sessions/0a3612df-33d3-468e-add8-a3b3664a2607 Co-authored-by: thadguidry <986438+thadguidry@users.noreply.github.com>
Agent-Logs-Url: https://github.com/9tigerio/db2rest/sessions/0a3612df-33d3-468e-add8-a3b3664a2607 Co-authored-by: thadguidry <986438+thadguidry@users.noreply.github.com>
|
@copilot can you add a new issue so that we ensure we have similar test and handling for table and schema names for mysql and it's convention use of backticks? In this pr, I'd like you to also add to the test case for unicode in table or schema names. Example: |
Agent-Logs-Url: https://github.com/9tigerio/db2rest/sessions/37e6d5dc-3bdc-4e70-860f-0f381b4485f1 Co-authored-by: thadguidry <986438+thadguidry@users.noreply.github.com>
Added unicode identifier coverage to the PostgreSQL test in commit c78a73c ( Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@kdhrubo are you satisfied on this changes and ready to merge? |
PostgreSQL queries failed for schemas starting with numeric characters (e.g.
0HEM8B0GQNB5M) because metadata extraction produced unquotedschema.tablenames. This caused invalid SQL parsing (trailing junk after numeric literal) when those names were used in generated queries.Identifier rendering fix (PostgreSQL metadata path)
PostgreSQLDataExclusionto buildDbTable.fullNamewith quoted identifiers for both schema and table.Behavioral impact
Focused regression coverage
PostgreSQLDataExclusionTestvalidating that schema0HEM8B0GQNB5Mand tablet_regionproduce a fully-qualified name as quoted identifiers.PostgreSQLDataExclusionTestvalidating quoted full-name generation for unicode schema/table names (e.g."dátá_数据"."dátá").