Changes between Version 9 and Version 10 of rfc35_deletereorderalterfielddefn
- Timestamp:
- May 9, 2011, 12:37:59 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
rfc35_deletereorderalterfielddefn
v9 v10 197 197 and can be used by all drivers implementing OGRLayer::ReorderFields() to validate the panMap argument. 198 198 199 == Altering field types == 200 201 This RFC does not attempt to guarantee which type conversions will be possible. 202 It will depend on the capabilities of the implementing drivers. 203 For example, for database drivers, the operation will be directly done 204 on the server side (through a 'ALTER TABLE my_table ALTER COLUMN my_column TYPE new_type' 205 command for the PG driver). So some conversions might be possible, others not... 206 207 It is however expected that converting from any type to OFTString will be supported in 208 most cases when AlterFieldDefn() is supported. 209 210 Drivers that don't support a conversion and that were required to 211 do it (ALTER_TYPE_FLAG set and new_type != old_type) should emit an explicit error. 212 199 213 == Compatibility Issues == 200 214 … … 206 220 extended with DBFReorderFields() and DBFAlterFieldDefn(). 207 221 208 Note: The implementation of AlterFieldDefn() in the Shapefile driver does not currentlysupport altering209 the field type, and will not reformat numeric values of existing features if width or precision are changed.210 However, appropriate field truncation or expansion will occur if the width is altered.222 Note: The implementation of AlterFieldDefn() in the Shapefile driver does not support altering 223 the field type, except when converting to OFTString. It will not reformat numeric values of existing features 224 if width or precision are changed. However, appropriate field truncation or expansion will occur if the width is altered. 211 225 212 226 Other drivers, mainly database drivers (PG, MySQL, SQLite), could be easily extented to implement the new API 213 227 by issuing the appropriate SQL command (ALTER TABLE foo DROP COLUMN bar, ALTER TABLE foo ALTER COLUMN bar, ...). 214 228 The implementation of DeleteField() and AlterFieldDefn() in the PG driver is indeed planned, 215 provided this RFC is adopted. 229 provided this RFC is adopted. The Memory driver will also updated to support DeleteField(), ReorderFields() and AlterFieldDefn(). 216 230 217 231 == SWIG bindings == … … 228 242 Implementation will be done by Even Rouault in GDAL/OGR trunk. Changes in Shapelib will need to be 229 243 pushed into upstream CVS by a Shapelib committer. The proposed implementation is attached as 230 a patch in ticket #2671 ([http://trac.osgeo.org/gdal/attachment/ticket/2671/rfc35_v 2.patch rfc35_v2.patch]).244 a patch in ticket #2671 ([http://trac.osgeo.org/gdal/attachment/ticket/2671/rfc35_v3.patch rfc35_v3.patch]).