Ensure that your field names are all lowercase and don't have any special characters. If need be, create a View with your data and change the field names of any fields with mixed case names and/or special characters like spaces. This should solve the error you are seeing.
For example, in the Select portion of the view change the field name with
SELECT
"EditDate" AS edit_date, ....
Ideally, you'll just be using lowercase field names all the time in your postgresql tables to avoid this issue, but I understand legacy databases are fun.