You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Author Name: Ivan Mincik (Ivan Mincik)
Original Redmine Issue: 2676
Redmine category:c++_plugins
Assignee: Tim Sutton
When exporting ESRI SHP to [[PostGIS]] using SPIT plugin, resulting [[PostGIS]] table is created with 'integer' data type on PRIMARY KEY column (gid) instead usual 'serial' data type.
Such created table is not usable for clients expecting auto increment
value on 'gid' column and it also differs from standard shp2pgsql tool.
Example:
Table created by SPIT:
gid integer,
foo character varying,
the_geom geometry
Expected table structure:
gid serial,
foo character varying,
the_geom geometry
Both of these cases are working well in QGIS. If there is no serious reason for
'integer', I would suggest switching to 'serial' data type.
Looking to source code, we need to:
change 'integer' to 'serial' in table creation statement.
change data INSERT statements to not include 'gid' column value.
The text was updated successfully, but these errors were encountered:
Author Name: Ivan Mincik (Ivan Mincik)
Original Redmine Issue: 2676
Redmine category:c++_plugins
Assignee: Tim Sutton
When exporting ESRI SHP to [[PostGIS]] using SPIT plugin, resulting [[PostGIS]] table is created with 'integer' data type on PRIMARY KEY column (gid) instead usual 'serial' data type.
Such created table is not usable for clients expecting auto increment
value on 'gid' column and it also differs from standard shp2pgsql tool.
Example:
Table created by SPIT:
gid integer,
foo character varying,
the_geom geometry
Expected table structure:
gid serial,
foo character varying,
the_geom geometry
Both of these cases are working well in QGIS. If there is no serious reason for
'integer', I would suggest switching to 'serial' data type.
Looking to source code, we need to:
The text was updated successfully, but these errors were encountered: