Subject: retrieve in libpq

From: Praveen Mamnani <[email-masked]>
Date: Fri, 14 Oct 1994 17:27:25 -0600 (MDT)

I had some embedded SQL programs that I was converting to PQL,

In SQL one can do a SELECT <field name>. 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.