View Issue Details

IDProjectCategoryView StatusLast Update
0005721SymmetricDSBugpublic2023-03-09 20:00
Reporterumssoft Assigned Topmarzullo  
Priorityurgent 
Status closedResolutionfixed 
Product Version3.14.5 
Target Version3.14.6Fixed in Version3.14.6 
Summary0005721: Query tries to address mixed-case column without quotes (Postgres)
Description2023-03-03 19:11:48,873 ERROR [server-000] [NodeCommunicationService] [server-000-extract-default-1] Failed to execute EXTRACT for node 001 and channel default StackTraceKey.init [SqlException:2972325355] org.jumpmind.db.sql.SqlException: Failed to execute sql: select case when t."Guid" is null then '' else '"' || replace(replace(cast(t."Guid" as varchar),$$\$$,$$\\$$),'"',$$\"$$) || '"' end as x__0,"Name" as x__1,"Description" as x__2,"Image" as x__3,case when t."ParentClassGuid" is null then '' else '"' || replace(replace(cast(t."ParentClassGuid" as varchar),$$\$$,$$\\$$),'"',$$\"$$) || '"' end as x__4 from "Document"."DocumentClass" t where (ParentClassGuid is null or ParentClassGuid = Guid)
...
Caused by: org.postgresql.util.PSQLException: ОШИБКА: столбец "parentclassguid" не существует
(ERROR: column "parentclassguid" does not exist)
Additional InformationThis part of the query causes the problem:
(ParentClassGuid is null or ParentClassGuid = Guid).

Column names that are not double-quoted are folded to lowercase in PostgreSQL, so it tries to address "parentclassguid" instead of "ParentClassGuid". Column names are case-sensitive.

Hence the inability to find said column.

...("ParentClassGuid" is null or "ParentClassGuid" = "Guid") seems to work correctly.
Tagsdialect: postgresql, extract

Activities

pmarzullo

2023-03-09 19:16

developer   ~0002292

This really applies to more than Postgres. It applies to all dialects.
I tested with H2, Oracle, Postgres, SQL Server, and MySQL.

Related Changesets

SymmetricDS: 3.14 9c569cb6

2023-03-09 19:14:16

pmarzullo

Details Diff
0005721: Query tries to address mixed-case column without quotes
(Postgres)
Affected Issues
0005721
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/extract/SelectFromTableSource.java Diff File

Issue History

Date Modified Username Field Change
2023-03-03 16:50 umssoft New Issue
2023-03-03 16:50 umssoft Tag Attached: dialect: postgresql
2023-03-03 16:50 umssoft Tag Attached: extract
2023-03-09 12:57 pmarzullo Assigned To => pmarzullo
2023-03-09 12:57 pmarzullo Status new => assigned
2023-03-09 19:16 pmarzullo Status assigned => resolved
2023-03-09 19:16 pmarzullo Resolution open => fixed
2023-03-09 19:16 pmarzullo Fixed in Version => 3.14.6
2023-03-09 19:16 pmarzullo Note Added: 0002292
2023-03-09 19:16 pmarzullo Target Version => 3.14.6
2023-03-09 20:00 pmarzullo Changeset attached => SymmetricDS 3.14 9c569cb6
2023-03-17 17:25 admin Status resolved => closed