agora inbox for postgres@postgres.berkeley.edu
help / color / mirror / Atom feedlibpq question.
2+ messages / 2 participants
[nested] [flat]
* libpq question.
@ 1994-05-04 02:22 perera@pollux.cs.uga.edu
0 siblings, 1 reply; 2+ messages in thread
From: perera@pollux.cs.uga.edu @ 1994-05-04 02:22 UTC (permalink / raw)
To: legacy
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: perera@cs.uga.edu
=(_^_)= 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 "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.
===============================================================================
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: libpq question.
@ 1994-05-10 00:06 Paul M. Aoki <aoki@postgres.Berkeley.EDU>
parent: perera@pollux.cs.uga.edu
0 siblings, 0 replies; 2+ messages in thread
From: Paul M. Aoki @ 1994-05-10 00:06 UTC (permalink / raw)
To: perera@pollux.cs.uga.edu; +Cc: legacy
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.
===============================================================================
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~1994-05-10 00:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1994-05-04 02:22 libpq question. perera@pollux.cs.uga.edu
1994-05-10 00:06 ` Paul M. Aoki <aoki@postgres.Berkeley.EDU>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox