[postgis-users] PostGIS 2.1 CREATE EXTENSION vs Loading postgis.sql and spatial_ref_sys.sql

Puthick Hok hputhick at gmail.com
Tue Feb 3 20:41:13 PST 2015


Hi,

I was given a schema whose tables contain primary key fields named just 
'id'. For example, layer table has 'id' field as it primary key and 
'name' as a normal field. I already know that these two names are not 
good name because they are reserved words used in many places like they 
break XML, for example.

I use Perl DBI to connect to Postgresql. If I create the postgis 
database using 'CREATE EXTENSION' method, Perl DBI returns 'layer_id' as 
the primary key of my layer table. If I create the postgis database 
using the old incompatible way of loading postgis.sql and 
spatial_ref_sys.sql, Perl DBI returns 'id' as it is named as the primary 
key of my layer table.

Can anyone explain the details? My postgresql is 9.3.5 and postgis is 
2.1. I need an excuse for my broken code just because the database is 
created using a different method.

Thanks,
Puthick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20150204/4e258917/attachment.html>


More information about the postgis-users mailing list