[OSM-dev] Period In Key Names: Will It Cause A Problem?

Kevin Atkinson kevin at atkinson.dhs.org
Wed Aug 4 00:09:35 BST 2010

Will a period in the key name for a tag cause a problem?

It is proposed in:

I would like to use it for some custom tags I am using, namely 
"name.prefix", and "name.full" (see below for context).  The idea is that 
".prefix" and ".full" is closely tied to the primary "name" key, and 
not some other forms of name such as "alt_name".  If the properties applied to the 
"alt_name" key than "alt_name.prefix" will be used instead, etc.

However, if the period will cause any sort of problem I will just use 
underscore in its place.  The underscore doesn't make the relation as 
obvious, but its not a big deal.

---------- Forwarded message ----------
Date: Tue, 3 Aug 2010 16:01:46 -0500
From: Ian Dees <ian.dees at gmail.com>
To: Richard Weait <richard at weait.com>
Cc: Kevin Atkinson <kevin at atkinson.dhs.org>, talk-us at openstreetmap.org
Subject: Re: [Talk-us] Would Like To Clean Salt Lake City Street Names

On Tue, Aug 3, 2010 at 3:57 PM, Richard Weait <richard at weait.com> wrote:

> On Tue, Aug 3, 2010 at 4:05 PM, Kevin Atkinson <kevin at atkinson.dhs.org>
> wrote:
>> I'm almost done with this script.  It's not a full bot, but instead
> modifies
>> an osm file which I will read back into JOSM and upload the changed parts
>> (or if that doesn't work use one of the upload scripts). Changes in what
> It
>> will do noted below.
> [ ... ]
>> I'm not going to do this.  Instead I am going to simply remove variants
> on
>> "name" (for example all other names in the "900 East" example).  And than
>> leave all other name_* and *_name alone (i.e. name_1, alt_name, etc).
> When
>> the alternate name is a numbered street, it will get the ".prefix" and
>> ".full" tags.  For example:
>>  name: Lorna Circle
>>  name_1: 3805 South
>>  name_1.prefix: W
>>  name_1.full: West 3805 South
> Whoa.  Are you considering adding a period "." to the key?  Might that
> mess up postgres?  From
> http://www.postgresql.org/docs/8.2/static/sql-syntax-lexical.html
> "The period (.) is used in numeric constants, and to separate schema,
> table, and column names. "
> Perhaps bounce some of these ideas around on dev?
I imagine the Ruby code is doing the proper escaping for text like this, but
you're right: definitely worth a message to the dev list.

Not that it matters too much to the majority of the OSM community, but a
period in the key name is invalid for most NoSQL-based systems (MongoDB in

More information about the dev mailing list