query against pg_trigger causes exception to be raised in PG 9.2

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

query against pg_trigger causes exception to be raised in PG 9.2

Post by snorkel » Tue 22 Oct 2013 17:30

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.

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

Re: query against pg_trigger causes exception to be raised in PG 9.2

Post by AlexP » Wed 23 Oct 2013 06:42

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;

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

Re: query against pg_trigger causes exception to be raised in PG 9.2

Post by snorkel » Wed 23 Oct 2013 22:07

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)

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

Re: query against pg_trigger causes exception to be raised in PG 9.2

Post by AlexP » Thu 24 Oct 2013 07:14

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

Post Reply