有以下查询在通过 java 驱动程序执行时给出错误,在 DBVisualizer 上执行时没有错误
SELECT pr.id,
pr.name,
CDPC.category_id,
CDPC.category_depth,
CDPC.product_count,
pr.primary_category_id
FROM ics_products_to_include_tmp inc
INNER JOIN catalog.products pr ON inc.product_id = pr.id
INNER JOIN catalog.products_in_categories pic ON pic.product_id = pr.id AND pic.active = true
INNER JOIN catalog.categories CC ON CC.id = pic.category_id AND CC.active = true
INNER JOIN category_depth_product_count_tmp CDPC
ON CDPC.category_id = CC.id
AND NOT EXISTS (SELECT *
FROM ics_products_cds_ids_tmp cds
WHERE cds.product_id = pr.id)
WHERE pr.site_id = '150'
ORDER BY pr.id
这是错误
线程“主”org.postgresql.util.PSQLException 中的异常:错误:输入末尾的语法错误 职位:495 在 org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103) 在 org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836) 在 org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257) 在 org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512) 在 org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388) 在 org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:381) 在 com.cnetchannel.ics.loader.IntermediateDatafeedGenerator.main(RRToIntermediateLoader.java:798) 与目标 VM 断开连接,地址:'127.0.0.1:51077',传输:'socket'