From eed0def52812c5350a38fc4864c6c0e08fe0df37 Mon Sep 17 00:00:00 2001 From: Yves Date: Wed, 18 Dec 2024 14:35:51 +0100 Subject: [PATCH] Quote column name --- src/scan/postgres_scan.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scan/postgres_scan.cpp b/src/scan/postgres_scan.cpp index 0152fb61..edf3797f 100644 --- a/src/scan/postgres_scan.cpp +++ b/src/scan/postgres_scan.cpp @@ -108,7 +108,8 @@ PostgresScanGlobalState::ConstructTableScanQuery(duckdb::TableFunctionInitInput first = false; scan_query << "("; auto attr = table_tuple_desc->attrs[attr_num - 1]; - scan_query << filter->ToString(attr.attname.data).c_str(); + auto col = quote_identifier(attr.attname.data); + scan_query << filter->ToString(col).c_str(); scan_query << ") "; } }