Re: [GENERAL] Cannot login, with C/C++ program

2009-12-02 Thread Daniel
Oops, as it happens I had an error in my program logic and pg_conn was actually true. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Cannot login, with C/C++ program

2009-12-02 Thread Daniel Verite
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)

Re: [GENERAL] Cannot login, with C/C++ program

2009-12-02 Thread Pedro Doria Meunier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Did you check you pg_hba.conf ? another thing: although port defaults to 5432 you *should* specify that in the connection string. also... is "sysdba" *really* an authorized user? check your permissions... BR, Pedro. On 12/02/2009 09:42 PM, Tom Lane w

Re: [GENERAL] Cannot login, with C/C++ program

2009-12-02 Thread Tom Lane
Daniel writes: > 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) > { >

[GENERAL] Cannot login, with C/C++ program

2009-12-02 Thread Daniel
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 (P