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;