Return-Path: owner-postman Delivery-Date: Mon, 09 May 94 19:26:50 -0700 Return-Path: owner-postman Received: from localhost (localhost [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id RAA03169 for postgres-redist; Mon, 9 May 1994 17:06:42 -0700 Resent-From: POSTGRES mailing list Resent-Message-Id: <199405100006.RAA03169@nobozo.CS.Berkeley.EDU> Sender: owner-postman@postgres.Berkeley.EDU X-Return-Path: owner-postman Received: from faerie.CS.Berkeley.EDU (faerie.CS.Berkeley.EDU [128.32.149.14]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with ESMTP id RAA03159 for ; Mon, 9 May 1994 17:06:42 -0700 Received: from localhost (localhost [127.0.0.1]) by faerie.CS.Berkeley.EDU (8.6.4/8.1B) with SMTP id RAA29481; Mon, 9 May 1994 17:06:29 -0700 Message-Id: <199405100006.RAA29481@faerie.CS.Berkeley.EDU> X-Authentication-Warning: faerie.CS.Berkeley.EDU: Host localhost didn't use HELO protocol From: aoki@postgres.Berkeley.EDU (Paul M. Aoki) To: perera@pollux.cs.uga.edu Cc: postgres@postgres.Berkeley.EDU Subject: Re: libpq question. Reply-To: aoki@postgres.Berkeley.EDU (Paul M. Aoki) In-reply-to: Your message of Tue, 3 May 1994 22:22:28 -0400 (EDT) <9405040222.AA21010@pollux.cs.uga.edu> Date: Mon, 09 May 94 17:06:29 -0700 X-Sender: aoki@postgres.Berkeley.EDU Resent-To: postgres-redist@postgres.Berkeley.EDU X-Mts: smtp Resent-Date: Mon, 09 May 94 17:06:42 -0700 Resent-XMts: smtp perera@pollux.cs.uga.edu writes: > ... > 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 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 | aoki@postgres.Berkeley.EDU | Berkeley, CA 94720 | ...!uunet!ucbvax!aoki =============================================================================== To add/remove yourself from the POSTGRES mailing list: send mail with the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU" If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and a human will deal with it. DO NOT post to the "postgres" mailing list. ===============================================================================