Assertion Error

Discussion of open issues, suggestions and bugs regarding PgDAC (PostgreSQL Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
snorkel
Posts: 384
Joined: Tue 08 Aug 2006 15:10
Location: Milwaukee WI USA

Assertion Error

Post by snorkel » Fri 26 Dec 2008 18:45

Hi,
I am getting this error on a certain query:

First chance exception at $7C812AEB. Exception class EAssertionFailed with message 'Assertion failure (D:\Projects\Delphi\Dac\Source\MemData.pas, line 8547)'.

This is the query:

select trg.oid,trg.tgname as trigger_name ,trg.tgtype,trg.tgnargs,trg.tgargs,trg.tgisconstraint,trg.tgdeferrable,trg.tginitdeferred,
p.pronamespace,
(select description from pg_description where objoid = trg.oid) as comment,
(select nspname from pg_namespace where oid = p.pronamespace)||'.'||p.proname as function_name ,
case trg.tgtype & cast(1 as int2)
when 0 then false
else true
end as row_trigger,
cast(case trg.tgtype & cast(2 as int2)
when 0 then 'AFTER'
else 'BEFORE'
end as varchar(50)) as trigger_type,
cast(case trg.tgtype & cast(28 as int2)
when 16 then 'UPDATE'
when 8 then 'DELETE'
when 4 then 'INSERT'
when 20 then 'INSERT, UPDATE'
when 28 then 'INSERT, UPDATE, DELETE'
when 24 then 'UPDATE, DELETE'
when 12 then 'INSERT, DELETE'
end as varchar(50)) as trigger_event
from pg_trigger trg, pg_proc p
where trg.tgfoid = p.oid AND trg.tgname NOT LIKE 'RI_%' AND trg.tgrelid = :tableoid;

snorkel
Posts: 384
Joined: Tue 08 Aug 2006 15:10
Location: Milwaukee WI USA

Post by snorkel » Fri 26 Dec 2008 18:53

oh, forgot to add the error is only raised if the table identified by the tableoid param actually has a trigger and trigger function. The query runs without the assertion error if the table has no triggers.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Sat 27 Dec 2008 10:03

We have fixed this problem. The fix will be included in the next build of PgDAC.

Post Reply