Subject: libpq question.

From: [email-masked]
Date: Tue, 3 May 1994 22:22:28 -0400 (EDT)

Hi:

I am having a problem with the mesg that I get back from PQexec.
	...
	char *q1 = "define view toy ( sno = s.sno, city = s.city )";
	char *q2 = "retrieve ( toy.all )";
	char *response = NULL;
	response = (char *) PQexec(q1);  /*  response has CAPPEND 373920 */
	response = (char *) PQexec(q2);  /*  response has CDEFINE */
	response = (char *) PQexec(q2);  /*  response has Pblank */
	...

Why is that the first time I do query q2 I get a CDEFINE and the next time
I get a Pblank ? I thought that doing a retrieve gives a "Pblank" from PQexec.
Am I doing something incorrectly here ?

postgres version 4.1, on a SUN 690MP.

Thanks,

-- Niranjan

-- 
 _   /|
 \'o.O'  Niranjan Perera, 415 GSRC Bldg,CS Dept | EMAIL: [email-masked]
 =(_^_)= University Of Georgia, Athens GA30602. | PHONE: [+1] 706-548-5826
    U

===============================================================================
    To add/remove yourself from the POSTGRES mailing list: send mail with 
    the subject line ADD or DEL to "[email-masked]"

    If this fails, send mail to "[email-masked]" and
    a human will deal with it.  DO NOT post to the "postgres" mailing list.
===============================================================================

---

From: [email-masked] (Paul M. Aoki)
Date: Mon, 09 May 94 17:06:29 -0700

[email-masked] writes:
> I get a Pblank ? I thought that doing a retrieve gives a "Pblank" from PQexec

there is some discussion of this in the new reference manual under
libpq.  the basic protocol is hosed; some commands invoke postquel 
queries to do some of their work, which means that they return
multiple return status messages, and about all you can do is poke 
at the connection until you know the backend is done sending status 
messages.

look around under PQexec and PQFlushI.

monitor.c also has some code to handle this problem.
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  [email-masked]
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki