select query on postgis not working for specific fields
Probably this columns names has been created using double-quotes.

You should use double-quotes in your SELECT statement.




create table tbl (field1 int, "FIELD2" int, field3 int);






insert into tbl values (1,2,3),(4,5,6);






select field1, field2, field3 from tbl;



ERROR:  column &quot;field2&quot; does not exist
LINE 1: select field1, field2, field3 from tbl;
                       ^
HINT:  Perhaps you meant to reference the column &quot;tbl.field1&quot; or the column &quot;tbl.field3&quot;.







select field1, "FIELD2", field3 from tbl;



field1 | FIELD2 | field3
-----: | -----: | -----:
     1 |      2 |      3
     4 |      5 |      6



db&lt;>fiddle here