I had some embedded SQL programs that I was converting to PQL, In SQL one can do a SELECT . In PQL one can retrieve a field in a similar manner : retrieve (result = EMP.salary) where EMP.name = "Bill" \g But when using libpq, executing such simpler queries is not easy. One has to get the instance in a portal buffer then apply some more functions (such as PQnfields(), PQgetvalue(), etc.) to get to that particular field (EMP.salary), for that particular employer "Bill". So every time when I have to retrieve a specific field in a class, I have to go through this process, instead of just specifying the field name and the "where" condition (as done in monitor). In the programs that I am converting I have many-many retrieve statements, and for each retrieve, I will have to go through all this process for each different field in a different class. Is there another way or an easier way to do such retrieve statments when using libpq? your help would be greatly appriciated. Praveen.