Opened 12 years ago
Closed 12 years ago
#4620 closed defect (fixed)
OGRPGTableLayer does not check for bUpdateAccess in CreateField
Reported by: | Ari Jolma | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.10.0 |
Component: | OGR_SF | Version: | unspecified |
Severity: | normal | Keywords: | PostgreSQL / PostGIS driver |
Cc: |
Description
The method should refuse to create a field if the data source is read-only, similar to DeleteField and AlterFieldDefn.
Change History (1)
comment:1 by , 12 years ago
Milestone: | → 2.0.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
I was aware of the problem, but hesitant to fix that because it might break applications. And indeed it "broke" the ogr_pg.py regression tests", but for GDAL 2.0, that's reasonable.
It would be good if we had a generic way of centralizing those tests and not in each driver though. This would be possible if the virtual method in each drivers would not be called directly, but if there was a generic layer before. A bit like RasterIO() (non-virtual implemented in the core GDALDataset/GDALRasterBand classes) and IRasterIO() (virtual implemented in each driver).
r24257 /trunk/ (3 files in 2 dirs): PG: honour datasource read-only mode in CreateField(), CreateFeature(), SetFeature() and DeleteFeature() (#4620)