Preface: I am using OSM2PGSQL to import my OpenStreetMap(OSM) data into PostgreSQL. This imports all the tags associated with each of the elements in the data, one of which is the "natural" tag. This tag defines what sort of terrain this area is. (IE, natural=water means this coordinate defines an area of water).
I am trying to access the column denoted as "natural", such as in the query
SELECT * FROM planet_osm_polygon WHERE natural='water' LIMIT 100;
However, because NATURAL is also a PostgresSQL clause, the query returns an error.
Would there be a way to work around this issue? I've tried wrapping the word natural with quotation marks, to no avail.
Double quotes should work. Here is a quick example I used to verify
# create table test123( "natural" text );
CREATE TABLE
# insert into test123 values('test');
INSERT 0 1
# insert into test123 values('water');
INSERT 0 1
# select * from test123 where "natural"='water';
natural
---------
water
(1 row)