Postgre Array

Discussion of open issues, suggestions and bugs regarding PgDAC (PostgreSQL Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
doublehelix
Posts: 9
Joined: Mon 28 Dec 2009 23:42

Postgre Array

Post by doublehelix » Tue 27 Apr 2010 22:07

I've got items stored in a Postgre array field. Is there any simple way of getting to the array elements?

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

Post by bork » Thu 29 Apr 2010 11:21

Hello

Currently we don't support working with array fields directly. You can use the following query to get array values:

select MyArray[1], MyArray[2], MyArray[3]
from MyTable

Or you may retrieve all the array values as string:

begin
ShowMessage(PgQuery1.FieldByName('MyArray').AsString);
end;

Post Reply