Access Violation in trigger constraint

Access Violation in trigger constraint

Postby Claudio » Fri 17 Sep 2010 18:37

Version Delphi: 2010 (Update 5)
Version Postgres: libpq 8.4.4 (64)
Version Devart: 1.0.8
Server: SLACKWARE 13.1 - (64)

Windows 7

...
...
try
connection.commitfreeandnil(transaction);
except
connection.rollbackfreeandnil(transaction); <--- ACCESS VIOLATION

---- DATABASE -------------------------------------------------------------
create table test (id serial not null primary key, field text);

create or replace function ft_const_trig() returns trigger as $$
begin
raise exception 'error';
return null;
end;$$ language plpgsql;

create constraint trigger ft_constraint_trigger after insert or update or delete on test
deferrable initially deferred for each row execute procedure ft_const_trig();
Claudio
 
Posts: 25
Joined: Tue 17 Mar 2009 12:47

Postby AlexP » Mon 20 Sep 2010 08:09

Hello,

Please, send me a more detailed piece of code or a sample project so that I could reproduce the problem.
AlexP
Devart Team
 
Posts: 5528
Joined: Tue 10 Aug 2010 11:35

Code

Postby Claudio » Mon 20 Sep 2010 15:09

Hello,


var
Transaction: TDBXTransaction;
begin
Table.Open;
Table.Edit;
Table.FieldByName('field').AsString := 'test';
Table.Post;

Transaction := connection.BeginTransaction(TDBXIsolations.ReadCommitted);
try
Table.ApplyUpdates;
connection.commitfreeandnil(transaction);
except
connection.rollbackfreeandnil(transaction); <--- ACCESS VIOLATION
end;

end;
Claudio
 
Posts: 25
Joined: Tue 17 Mar 2009 12:47

Postby AlexP » Tue 21 Sep 2010 11:26

Hello,

Thank you for the information.
We will fix this bug in one of the next builds.
AlexP
Devart Team
 
Posts: 5528
Joined: Tue 10 Aug 2010 11:35

Postby bork » Tue 02 Nov 2010 08:21

Hello

We have fixed this problem. This fix will be included in the next dbExpress driver for PostgreSQL build.
bork
Devart Team
 
Posts: 643
Joined: Fri 12 Mar 2010 07:55


Return to dbExpress driver for PostgreSQL