Open kgday opened 1 year ago
This does work in MSSQL so probably wouldn't be too hard to fix in Postgres
I don't have Postgres so I can't test if it works in the latest version after this tiny fix. I'd expect it might do the query properly but may struggle to bring the results back to executing code.
I think the proper fix should be implementing selection of quote-characters like FireBird here: https://github.com/fsprojects/SQLProvider/pull/453/files
In PostGreSq with a table where the fields are declared double quotedl, I have the following query:
The following sql is emitted:
SELECT "pol"."JobID" as ""pol"."JobID"", "pol"."ChargeAccount" as ""pol"."ChargeAccount"", SUM("pol"."TotalCost") as "pol.SUM_TotalCost" FROM "public"."PurchaseOrderLine" as "pol" WHERE (("pol"."JobID" = @param1)) GROUP BY "pol"."JobID", "pol"."ChargeAccount">, Parameters<@param1=12482>
Note the as parts have been double quoted twice. This causes postgresql to return an error:
In fairness, groupby is discouraged in the docs.
The work arround obviously for me at present is to create a view or do the grouping in the client. But I would have thought this was a simple enough group by.