Access Violation in trigger constraint

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for PostgreSQL in Delphi and C++Builder
Post Reply
Claudio
Posts: 25
Joined: Tue 17 Mar 2009 12:47

Access Violation in trigger constraint

Post by 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();

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by 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.

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

Code

Post by 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;

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Tue 21 Sep 2010 11:26

Hello,

Thank you for the information.
We will fix this bug in one of the next builds.

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by 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.

Post Reply