[postgis-users] Quoting column names in MapServer PostGIS Support

Frank Warmerdam warmerdam at pobox.com
Wed May 15 20:48:06 PDT 2002


Paul Ramsey wrote:
> Frank Warmerdam wrote:
> 
>> This included ensuring that OGR always quotes column names (thus 
>> resulting in odd column names like MINOR1 and LNODE# in PostgreSQL.  
> 
> 
> I am going to leave most of this for Dave and Chris to address, but the 
> above is something I would like to comment on.  Do you think it is wise 
> to push through column names which pgsql generally considers illegal? I 
> recognize that they can be forced with generous use of quotes, but yuck. 
>  A little character replacement in the loader would go a long way here, 
> me thinks...
> 
> "Ugly column names they are, mmmmm..... "

Paul,

I can't say that I am certain preserving them is the correct approach but
the alternative is to be prepared to do alot of collision detetion and
other fancy stuff.  Given that quoting column names makes it safe to use
relatively arbitrary names, I think I would prefer to continue doing that
as opposed to "flattening" the names for easier use in hand coded SQL.

Note that the column names aren't illegal, they are just not simple SQL
tokens so they have to be quoted.

I am open to other feedback.

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent






More information about the postgis-users mailing list