Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fALE8Bm39971 for ; Wed, 21 Nov 2001 09:08:11 -0500 (EST) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.4/8.11.4) id fALDhs767551 for pgsql-admin@postgresql.org; Wed, 21 Nov 2001 08:43:54 -0500 (EST) (envelope-from news) From: Ryan Rohde Hansen X-Newsgroups: comp.databases.postgresql.admin Subject: Problems between Mandrake and pg Date: Wed, 21 Nov 2001 14:44:04 +0100 Organization: AAU Lines: 51 Message-ID: <3BFBAFA4.541ED1C2@control.auc.dk> Reply-To: ryan@eidolon.dk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: news@sunsite.dk X-Mailer: Mozilla 4.78 [en] (X11; U; SunOS 5.8 sun4u) X-Accept-Language: da, en X-Authenticated: @ To: pgsql-admin@postgresql.org X-Archive-Number: 200111/114 X-Sequence-Number: 2639 Hi We are a group studying at Aalborg University. We are at the moment developing a postgresql-db (7.1.3) on Mandrake 8.0, which we intend to access via libpq. But at the moment we can't even connect to the db. The connection is refused and we are asked if the -i option has been set in the startup of postmaster: [01gr551@ika dbkode]$ ./test1 Connection to host=localhost dbname=01gr551 failed, PQconnectPoll() -- connect() failed: Connection refused Is the postmaster running (with -i) at 'localhost' and accepting connections on TCP/IP port '5432'? The program we are running: #include #include #include int main() { PGconn *conn; const char *connection_str = "host=localhost dbname=01gr551"; conn = PQconnectdb(connection_str); if (PQstatus(conn) == CONNECTION_BAD) { fprintf(stderr, "Connection to %s failed, %s", connection_str, PQerrorMessage(conn)); } else { printf("Connected OK\n"); } PQfinish(conn); return EXIT_SUCCESS; }