[OSM-dev] Rendering with new osm.xml

matthew-osm at newtoncomputing.co.uk matthew-osm at newtoncomputing.co.uk
Sat Dec 2 17:36:39 GMT 2006


On Sat, Dec 02, 2006 at 12:02:20PM -0500, Christopher Schmidt wrote:
>  1. The XML uses 'natural', which I thought we decided was reserved word
>     in Postgres. Should that be 'natural_'? 

Heh, this isn't PostgreSQL's fault, as seems to be the general impression most
people have around here; it's actually part of SQL99 I believe, just the not
many other database actually include it.

The word "natural" allows you to do

  select name, address, department
  from employees
  natural join departments;

instead of

  select name, address, department
  from employees
  inner join departments
  on employees.deptid = departments.deptid;

The way to get around the problem, as with all reserved words, is to use double
quotes around the word, i.e.

  select "natural"
  from x

HTH,

-- 
Matthew




More information about the dev mailing list