Opened 16 years ago

Closed 9 years ago

#2267 closed defect (wontfix)

ogrinfo should not open datasources in write/append mode

Reported by: hobu Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: unspecified
Severity: normal Keywords:
Cc: Daniel Morissette, Even Rouault

Description

Frank,

Why does ogrinfo open datasources in update mode by default? I know there's the -ro switch to silence the noise, but for the SDE driver, I would like to depend on the fact that when a DataSource is opened for update I can go ahead and fire up the SDE state/version handling facilities. A simple ogrinfo without the -ro command in that case is going to have unintended consequences (pushing forward the edit state for the version queried). Can I depend on opening a DataSource for update having this kind of behavior (I'm quite screwed if I can't, actually), and if so, what is the argument for keeping ogrinfo opening in update mode?

Howard

Change History (6)

comment:1 by Daniel Morissette, 16 years ago

Cc: Daniel Morissette added

comment:2 by Even Rouault, 16 years ago

Cc: Even Rouault added

comment:3 by warmerdam, 16 years ago

<hobu> FrankW: any thoughts on #2267 ?
<gdaltrac> Ticket #2267: ogrinfo should not open datasources in write/append mode, http://trac.osgeo.org/gdal/ticket/2267
<crschmidt> hobu: ogrinfo can change the data...
<FrankW> My main concern is how that will impact -sql and that -sql might not work well in readonly mode.
* crschmidt thinks that -sql could imply -rw
<FrankW> That would be a plausible compromise.

comment:4 by Daniel Morissette, 16 years ago

Personally, since the command is called ogrinfo and not ogrupdate, I think we should default to read-only even if -sql is used. It should be up to the caller to use -rw if they use a SQL statement that requires update access.

comment:5 by Jukka Rahkonen, 10 years ago

Six more years gone with current behaviour with not much noise. Is there still pressure to change the default in GDAL 2.0?

comment:6 by Jukka Rahkonen, 9 years ago

Resolution: wontfix
Status: newclosed

Let's see if closing this ticket makes someone to react.

Note: See TracTickets for help on using tickets.