Re: Cannot login, with C/C++ program

From: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
To: "Daniel" <danwgrace(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Cannot login, with C/C++ program
Date: 2009-12-02 22:45:12
Message-ID: b8bb920d-d023-4577-80d0-e575031b4608@mm
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Daniel wrote:

> 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;
> }

In the program, you should
fprintf(stderr, "%s", PQerrorMessage(pg_conn))
and/or
copy-paste for us the psql command line that works.

Best regards,
--
Daniel
PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2009-12-02 22:49:15 Re: Catastrophic changes to PostgreSQL 8.4
Previous Message Brian Witt 2009-12-02 22:37:52 Re: use log_statement to log only SELECTs?