Hi
I'm planning a distribution of templates using spatialite.
Data are locally stored into a postgis db.
I made all tables in Postgres with different kind/lenght of text fields.
Some are small lenght and are VARCHAR(n) and some must contain a large
amount of text (mainly abstracts - 150-500 words) and I used the "TEXT" data
type.
I used this string to migrate all tables to spatialite
***************
ogr2ogr --config PG_LIST_ALL_TABLES YES --config PG_SKIP_VIEWS YES -f
"myfile.sqlite -progress PG:"dbname='mydb' active_schema=myschema
schemas=myschema host='localhost' port='5432' user='user'
password='password' " -lco LAUNDER=yes -dsco SPATIALITE=yes -lco
SPATIAL_INDEX=yes -gt 65536
***************
with this operation all "TEXT" fields are converted to VARCHAR (without
lenght) while all VARCHAR(n) are correctly converted.
Using DbManager in Qgis 2.0, making a drag'n drop from postgis schema to
spatialite db I get a spatialite table with all fields converted to "TEXT"
without lenght...

Also
Using the above ogr2ogr string the geom column in postgis is converted to
GEOMETRY in spatialite, while using dbmanager a geom column is created into
spatialite..

Why?
Are there problems if postgis TEXT fields are converted to VARCHAR in
spatialite when I'll return back data to postgis, and VARCHAR in spatialite
can contain large text blocks?

The same for geom/GEOMETRY..

Thanks
Pietro




--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/text-data-type-conversion-migrating-from-postgis-to-spatialite-tp5094159.html
Sent from the Quantum GIS - User mailing list archive at Nabble.com.
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to