[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 21:12:04 PST 2015

BladeOfLight16 wrote:
> On Tue, Feb 3, 2015 at 11:41 PM, Puthick Hok <hputhick at gmail.com 
> <mailto:hputhick at gmail.com>> wrote:
>     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.
> That doesn't make sense. I'm pretty sure that neither CREATE EXTENSION 
> nor running postgis.sql and spatial_ref_sys.sql would affect the 
> primary key of an existing table. Most likely, you're running some 
> other SQL of your own, and you have something weird going on in that. 
> How are you creating your "layer table"?
> ------------------------------------------------------------------------
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

I have double checked my code 'layer_id' is coming straight from calling 
$dbh->primary_key( undef, undef, 'layer');
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20150204/d7a378bc/attachment.html>

More information about the postgis-users mailing list