[postgis-users] Quoting table names in AddGeometryColumn()

Frank Warmerdam warmerdam at pobox.com
Sat Oct 19 20:52:37 PDT 2002


Guys,

I am not sure if this was discussed in the past when we talked about
quoting column names but I would like to be able to use table names that
need to be quoted.  I can construct my SQL carefully from OGR and things
work with one exception.  That is the AddGeometryColumn() function which
is distributed as part of PostGIS.

To make it work, I need the two ALTER TABLE commands in the function to
add "quote_ident()" around the use of table_name.

I imagine similar issues could arrise in DropGeometryColumn(), and with
arguments such as the geometry column name, but I have not encountered them.

I realize you are likely to come back saying that it is bad karma to use
column or table names that are not natural Postgres identifiers (ie. lower
case, no special characters), but if you would allow for the moment that
it should be a legal option, how can it be accomplished?

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