Opened 13 years ago

Closed 4 years ago

Last modified 4 years ago

#1265 closed enhancement (fixed)

Code to fix transctions in OGR PostgreSQL driver

Reported by: amagnum2@… Owned by: Even Rouault
Priority: normal Milestone: 2.0.0
Component: OGR_SF Version: unspecified
Severity: normal Keywords: PostgreSQL
Cc: Markus Neteler, warmerdam, Mateusz Łoskot

Description (last modified by warmerdam)

I have attached the code that would allow for PGSQL transactions. The existing behaviour is that the tranactions work, but sometimes they are commited premateurely. I don't think this affects ogr2ogr or ogrinfo but it does affect people that are trying to do things such as inserting data and then selecting that data, or anything that is more complex than populatinga table.

Note that in order to start a transaction, there must be at least one layer in the database, since the call to begin transaction is in the layer object.

Attachments (2)

ogrpgdatasource.cpp (48.2 KB) - added by amagnum2@… 13 years ago.
ogrpgdatasource.cpp
ogrpglayer.cpp (36.8 KB) - added by amagnum2@… 13 years ago.
ogrpglayer.cpp

Download all attachments as: .zip

Change History (13)

Changed 13 years ago by amagnum2@…

Attachment: ogrpgdatasource.cpp added

ogrpgdatasource.cpp

Changed 13 years ago by amagnum2@…

Attachment: ogrpglayer.cpp added

ogrpglayer.cpp

comment:2 Changed 12 years ago by warmerdam

Cc: warmerdam added
Description: modified (diff)
Milestone: 1.5.0
Owner: changed from warmerdam to Mateusz Łoskot
Priority: highestnormal
Severity: minornormal

Matuesz,

When things are settled down, I'd like this patch considered for 1.5.0.

comment:3 Changed 12 years ago by Mateusz Łoskot

Cc: Mateusz Łoskot added

comment:4 Changed 12 years ago by Mateusz Łoskot

Keywords: PostgreSQL added

comment:5 Changed 12 years ago by warmerdam

Milestone: 1.5.01.6.0

To high risk to do this late in 1.5.

comment:6 Changed 12 years ago by Markus Neteler

Cc: Markus Neteler added; neteler@… removed

comment:7 Changed 8 years ago by warmerdam

Milestone: 1.6.4

Removing milestone.

comment:8 Changed 4 years ago by Jukka Rahkonen

Could it be possible to get some prompt examples about situations when transactions fail with the current driver?

comment:9 Changed 4 years ago by Even Rouault

I might work on this in the future by introducing datasource level transaction API

comment:10 Changed 4 years ago by Even Rouault

Owner: changed from Mateusz Łoskot to Even Rouault

comment:11 Changed 4 years ago by Even Rouault

Milestone: 2.0
Resolution: fixed
Status: newclosed

RFC 54 committed in r28601

comment:12 Changed 4 years ago by Even Rouault

Milestone: 2.02.0.0

Milestone renamed

Note: See TracTickets for help on using tickets.