[postgis-users] AddGeometryColumn doesn't quote column name properly

strk strk at keybit.net
Wed Nov 12 12:56:56 PST 2003


bh wrote:
> 
> I'm trying to write some test cases for Thuban's PostGIS support which
> specifically test whether Thuban handles unusual table and column names
> properly, i.e. names containing spaces or quotes. Unfortunately it's
> impossible to create a table with a geometry column that contains spaces
> or double quotes because the name is not quoted correctly.
> 
> The code of AddGeometryColumn seems to try to deal with this in many
> cases by surrounding the table and column name with double quotes but
> there's at least one place where this isn't done for the column names,
> line 304 in postgis_sql_common.sql.in, rev. 1.19.

committed.

> 
> Adding the double quotes there as well would probably fix the problem
> for names with spaces but would still not work for names with double
> quotes. Double quotes also don't work in the table name even though
> spaces do. The best solution for all of these problems would be to use
> the quote_ident function instead of explicit double quotes.

from which postgresql is quote_ident() available ?

--strk;



More information about the postgis-users mailing list