Library for database access

I am using PostGRE SQL database and i want to access the data stored in the database parallely and store it in
an array.

Is there any library which can help me to access the database records parallely ?