Page 1 of 1
query against pg_trigger causes exception to be raised in PG 9.2
Posted: Tue 22 Oct 2013 17:30
by snorkel
Hi,
I just noticed that if you do a query like this:
select * from pg_trigger; a exception is raised.
I did some hacking around and discovered that the cause is the tgargs column which is type
bytea.
The exception is not raised on version 8.4 of PostgreSQL, just on 9.0 and up.
I am currently using version 3.2.8 of the PostgresDAC lib.
Re: query against pg_trigger causes exception to be raised in PG 9.2
Posted: Wed 23 Oct 2013 06:42
by AlexP
Hello,
We cannot reproduce the problem. Please try executing the following code, if the code returns errors - contact us again.
Code: Select all
PgConnection1.StartTransaction;
PgQuery1.SQL.Text := 'select * from pg_trigger';
PgQuery1.Options.OIDAsInt := True;
PgQuery1.Open;
ShowMessage(IntToStr(PgQuery1.RecordCount));
PgQuery1.Close;
PgConnection1.Rollback;
Re: query against pg_trigger causes exception to be raised in PG 9.2
Posted: Wed 23 Oct 2013 22:07
by snorkel
yes, that query works, as it's not attached to a dbgrid.
If I attach the query to a dbgrid, it raises this exception:
Project xxxxx raised exception class 'External: SIGSEGV,
in file 'c:\lazarus\components\PGDAC\Source\Memdata.pas' at line 9210: Piece.Blob:=Self.GetHashCode;
exception is also raised in Delphi xe2 when using the stock dbgrid and the quantum grid from dev express except it does not give a line in the source as Lazarus/FPC does.
If I list all the fields in the query except for the args it works as expected. , note this works fine in servers 8.4 and below and shows up in the grid as (blob)
Re: query against pg_trigger causes exception to be raised in PG 9.2
Posted: Thu 24 Oct 2013 07:14
by AlexP
Hello,
We cannot reproduce the problem either in Lazarus 1.0.12 or in XE2. Please try to reproduce the problem on the latest PgDAC version 4.1.4