Make 2Pack transaction safe (for postgres)

Description

At this moment 2Pack executes a commit statement on certain DDL statements, like CREATE TABLE.

This was developed that way because Oracle has an implicit COMMIT on DDL statements, and we wanted to make the behavior of 2Pack consistent between oracle and postgresql.

But postgresql doesn't have that restriction, so in principle a 2pack in postgresql can be rolled back even if it contains DDL statements (not in oracle).

Proposal here is to create a SysConfig key to drive if we want the actual behavior (2PACK_COMMIT_DDL) or exploit the full postgresql power on this.

Regards,

Carlos Ruiz

Environment

None

Activity

Show:

RedhuanO April 20, 2016 at 10:45 PM

Yes, that sounds right and more elegant. I better modernize to real iDempiere way. Gracias!

Carlos Ruiz April 20, 2016 at 9:22 PM

, you could try also to split the 2pack in two parts, one creating the tables, and the other inserting the initial data

RedhuanO April 20, 2016 at 8:48 PM

This broke my 2Pack, http://red1.org/adempiere/viewtopic.php?f=45&t=1821#p8783
I wonder if it can be set to 'Y' as default.

Carlos Ruiz April 6, 2016 at 7:41 PM

Thanks , committed your suggestion

Dirk Niemeyer April 3, 2016 at 6:42 PM

Hi ,
the migration script for oracle is producing the error
{{SQL> SQL> SQL> 2 ALTER TABLE AD_Package_Imp_Detail MODIFY Name VARCHAR2(2000) DEFAULT NULL
*
ERROR at line 1:
ORA-01439: column to be modified must be empty to change datatype
}}
Please change the datatype to NVARCHAR2. Thanks.
Regards,
Dirk Niemeyer

Fixed

Details

Assignee

Reporter

Priority

Created March 22, 2016 at 6:19 PM
Updated June 2, 2016 at 2:06 AM
Resolved April 6, 2016 at 7:41 PM