Cannot login, with C/C++ program - Mailing list pgsql-general

From Daniel
Subject Cannot login, with C/C++ program
Date
Msg-id fc0f8511-ee51-4e6c-896e-a6d51bfd1cbf@r24g2000yqd.googlegroups.com
Whole thread Raw
Responses Re: Cannot login, with C/C++ program  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Cannot login, with C/C++ program  ("Daniel Verite" <daniel@manitou-mail.org>)
List pgsql-general
I have written a C/C++ program that trys to log into a local
PostgreSQL database.  Here is the code:

  pg_conn = PQconnectdb(
    "hostaddr = '127.0.0.1' port = '' dbname = 'TBDB' user = 'sysdba'
password = 'stelmo777' connect_timeout = '10'");
  if (!pg_conn)
  {
    return false;
  }
  if (PQstatus(pg_conn) != CONNECTION_OK)
  {
    return false;  // <- execution reaches here.

I checked the database, user and password by logging in with psql.
What could be wrong?

pgsql-general by date:

Previous
From: Kern Sibbald
Date:
Subject: Catastrophic changes to PostgreSQL 8.4
Next
From: Rob W
Date:
Subject: Query using partitioned table hangs