Page 1 of 1

Postgre Array

Posted: Tue 27 Apr 2010 22:07
by doublehelix
I've got items stored in a Postgre array field. Is there any simple way of getting to the array elements?

Posted: Thu 29 Apr 2010 11:21
by bork
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;