[Qgis-developer] DB Manager: SERIAL is converted into int4

Bo Victor Thomsen bo.victor.thomsen at gmail.com
Mon Dec 21 12:12:48 PST 2015


Not disagreeing about the bug  - but:

A "serial" data type in PostgreSQL is syntatic sugar for "integer NOT NULL
DEFAULT nextval('some_sequence'::regclass)" combined with the implicit
creation of a sequence used in the DEFAULT clause.

So the D&D function *do* create the correct base type for the column, but
fails to create the corresponding sequence and default clause for the
column.

2015-12-21 15:31 GMT+01:00 Paolo Cavallini <cavallini at faunalia.it>:

> Hi all,
> when D&D between different DBs, a SERIAL column is silently converted
> into a int4, and trying to modify the table through the DB Manager edit
> table tool throws an error. To me this seems a bug, anyone disagrees?
> Thanks.
> --
> Paolo Cavallini - www.faunalia.eu
> QGIS & PostGIS courses: http://www.faunalia.eu/training.html
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer




-- 
Med venlig hilsen

Bo Victor Thomsen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20151221/de114043/attachment.html>


More information about the Qgis-developer mailing list