Subject: Mosaic and libpq

From: Vivek Shivpuri <[email-masked]>
Date: Mon, 9 May 1994 17:34:35 -0400 (EDT)

A few weeks ago Russ posted the following :-

-----------------Russ's posting --------------------

 I'm having problems with the libpq call PQexec.

 I'm almost positive the problem stems from trying to integrate my
 postgres and a mosaic form server. If anyone knows what I'm talking about,
 please help. Here's some more details.

 I am setting up a world-wide-web server and want to be able to use postgres to
 keep track of some things. So I've got a some data that the user inputs via
 a Mosaic form, this form get submitted to a.out, which parses it, and queries
 postgres. For some reason the program just hangs on
   PQexec("begin");

   Before I make this call the program has succesfully executed
   PQtrace();
   PQsetdb("dbname");
   buff=PQdb();

   I have tried removing all traces of the www interface and the program ran 
   succesfully, so that's why I think the problem lies there.

   Thanks
   Russ

-----------------ends ----------------

 Unfortuately no one replied to this. I am having the exact same problem.

 Any useful hints or any advice would be appreciated......I've been working
 on this problem for 2 days now....and I'm about to give up unless I get
 some help!!

 Vivek
 ([email-masked])

===============================================================================
    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 15:29:32 -0700

>  Unfortuately no one replied to this. I am having the exact same problem.

not knowing anything about how www clients work, it's a bit hard to 
suggest anything, but i can make the following observations:
	- somewhere in PQexec is the first attempt to make a network
	connection.
	(e.g., a child process of mosaic or httpd may not have the 
	environment set up as you might expect, which is one factor
	that may bollix the attempt to make a network connection.)
	- you have both the libpq source and a debugger; it can't be 
	*that* hard to figure out exactly what operation is blocking..?
	(i.e., run gdb on a client compiled with -g, get to the call in
	PQexec and just keeping hitting "step")

(does stderr have a place to go?  can you see what it is?)
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  [email-masked]
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki