Return-Path: mao
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA18703; Tue, 23 Jun 92 08:20:38 -0700
Message-Id: <9206231520.AA18703@postgres.Berkeley.EDU>
From: <mao@postgres.berkeley.edu>
Subject: Re: HELP!!
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
In-Reply-To: Your message of Tue, 23 Jun 92 06:17:17 PST.
             <9206231317.AA17935@postgres.Berkeley.EDU> 
Date: Tue, 23 Jun 92 08:20:36 PDT

In message <9206231317.AA17935@postgres.Berkeley.EDU> you write:

> Is it possible to store a tuple to a variable and use that variable in 
> a retrieve command?

sure.  you should change your example to be

    char *myresult, *qryres;
    char myquery[512];

    myresult = PQgetvalue(p, t+i, j);

    /* myresult now has (let's say) the string 'Word Processing'.*/
    sprintf(myquery, "retrieve (t.all) where t.name = \"%s\"", myresult);
    qryres = PQexec(myquery);

					mike olson
					project sequoia 2000
					uc berkeley
					mao@cs.berkeley.edu
