<div dir="ltr"><div><br><br>On Wed, Apr 4, 2018 at 5:54 PM, Camille Bezzina <<a href="mailto:camille.bezzina@geophom.fr">camille.bezzina@geophom.fr</a>> wrote:<br>><br>> Hello all,<br>><br>><br>> I have a problem when I want to modify an attribute table.<br>><br>> I add a new vector with v.in.ogr. My attribute table is build like that :<br>><br>> name                   type                              length<br>><br>> cat                      integer                           20<br>> ID                       character                       24   <br>> PREC_PLANI       double precision             20<br>> NATURE              character                       31<br>> HAUTEUR           integer                            20<br>> id_2                    integer                            20<br>><br>><br>> I would like to remove the column 'HAUTEUR', but when I remove this<br>> column, my two character columns (ID and NATURE) change automatically to<br>> become :<br>><br>> ID                   text        1000<br>> NATURE         text        1000<br>><br>> Do you know why the simple fact to remove a column (HAUTEUR) change type<br>> and length of other columns.<br><br></div>The reason is that GRASS uses SQLite as database manager, and in SQLite there is nothing like varchar(24), only text without any length restrictions. That means, when importing vector data with attributes, any text fields are converted to text by SQLite itself. The value 1000 as length for text is somewhat misleading here because the maximum allowed length in SQLite is by default 1 billion.<br><div><br></div><div>Markus M<br></div><div>><br>> Thanks,<br>> --<br>><br>> Camille BEZZINA<br>> Chargé d'études géomatiques et photomontages<br>> Geophom<br>> 57 rue du Chemin Neuf 44521 OUDON<br>> Standard: +33(0)2 85 52 02 59<br>> Ligne directe: +33(0)9 72 56 81 71<br>> <a href="http://www.geophom.fr">www.geophom.fr</a><br>><br>> _______________________________________________<br>> grass-user mailing list<br>> <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>> <a href="https://lists.osgeo.org/mailman/listinfo/grass-user">https://lists.osgeo.org/mailman/listinfo/grass-user</a><br><br></div></div>