X-Original-To: pgsql-interfaces-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id DAC759FB354 for ; Mon, 31 Jul 2006 04:18:56 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 58391-01 for ; Mon, 31 Jul 2006 04:18:53 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.197]) by postgresql.org (Postfix) with ESMTP id 406C79FB34E for ; Mon, 31 Jul 2006 04:18:22 -0300 (ADT) Received: by nz-out-0102.google.com with SMTP id i11so165063nzi for ; Mon, 31 Jul 2006 00:18:20 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=WK/C9gyGibb4T3LeK3JNSXSJqxNQDakrXxblN3mE4uxkk4itlWzat9D9chMKUDXNWC7z5qpL+Av+arQfO+6PbIcZ7sT8ZBWDSeCD53AS3DIPwpeNLi7zfDKK6wAaUnURf1RSwJajmx/xKIuIldLEOjMNLJzDCpK7N4FqYRaXFdM= Received: by 10.65.251.1 with SMTP id d1mr2195235qbs; Mon, 31 Jul 2006 00:18:19 -0700 (PDT) Received: by 10.35.86.8 with HTTP; Mon, 31 Jul 2006 00:18:18 -0700 (PDT) Message-ID: Date: Mon, 31 Jul 2006 10:18:18 +0300 From: "=?ISO-8859-9?Q?Tu=F0berk_Kara?=" To: pgsql-interfaces@postgresql.org Subject: connection problem MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_42438_21687802.1154330298385" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.749 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, HTML_30_40, HTML_MESSAGE, NORMAL_HTTP_TO_IP, SPF_PASS X-Spam-Level: X-Archive-Number: 200607/23 X-Sequence-Number: 6213 ------=_Part_42438_21687802.1154330298385 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I have a postgresql installed on a remote machine. I want to connect to it with libpq but the connection is not successful. I have this piece of code for connection in my c file: PGconn *conn=NULL; char *conn_str="hostaddr=172.16.11.2 port=5432 dbname=postgres user=postgres password=654321 reqiressl=0"; conn=PGconnectStart(conn_str); if(PGstatus(conn)=CONNECTION_BAD){ PGerrorMessage(conn); } else{ printf("connected"); } But I can not connect. It exits from the program. I tried also PGconnectdb but it also did not connect to the databse. But I can connect to it thorough pgAdmin with the same credentials. Can you help me please urgently!'!!! ------=_Part_42438_21687802.1154330298385 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
I have a postgresql installed on a remote machine. I want to connect to it with libpq but the connection is not successful.
I have this piece of code for connection in my c file:
 
PGconn *conn=NULL;
char  *conn_str="hostaddr=172.16.11.2 port=5432 dbname=postgres user=postgres password=654321 reqiressl=0";
conn=PGconnectStart(conn_str);
if(PGstatus(conn)=CONNECTION_BAD){
 
  PGerrorMessage(conn);
}
else{
 
printf("connected");
 
}
 
But I can not connect. It exits from the program. I tried also PGconnectdb but it also did not connect to the databse. But I can connect to it thorough pgAdmin with the same credentials. Can you help me please urgently!'!!!
 
 
 
------=_Part_42438_21687802.1154330298385--