Opened 13 years ago
Closed 5 years ago
#3815 closed defect (wontfix)
[PATCH] OGR OCI Driver does not set FID column correctly at table define
Reported by: | PeterHalls | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | closed_because_of_github_migration |
Component: | default | Version: | 1.6.3 |
Severity: | normal | Keywords: | |
Cc: |
Description
The concept of the FID column, which is also enshrined in the GDAL OGR philosophy, is that this is a 'primary key' in database terms. The OCI driver does not impose constraints on any column, nor does the API support a mechanism by which a constraint can be specified for a column.
As OGR_FID, or its alternate name, is intended to be a Primary Key it is desirable that this constraint be specified. The impact of this is to enforce unique values for this column in all tuples, such that this will provide a form of safety-net in the case of multiple simultaneous update. An equivalent level of protection would be provided by setting the UNIQUE constraint, instead of PRIMARY KEY. If this patch is adopted, the proposed patch to ogrocitablelayer to ensure that the value of iNextFIDToWrite is managed properly, or some similar strategy, is essential: it would not be possible to append to a table at all with the existing code otherwise.
The attached patch to ogrocidatasource.cpp includes this change, in addition to the author's earlier modification to support tables without geometry.
Attachments (1)
Change History (3)
by , 13 years ago
Attachment: | ogrocidatasource.primary_key added |
---|
comment:1 by , 9 years ago
Summary: | OGR OCI Driver does not set FID column correctly at table define → [PATCH] OGR OCI Driver does not set FID column correctly at table define |
---|
comment:2 by , 5 years ago
Milestone: | → closed_because_of_github_migration |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.