X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id A73EAD1B504 for ; Mon, 15 Sep 2003 13:54:45 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 70535-08 for ; Mon, 15 Sep 2003 10:54:18 -0300 (ADT) Received: from fzkmail2.fzk.de (fzkmail2.fzk.de [141.52.27.52]) by svr1.postgresql.org (Postfix) with SMTP id 64E3CD1B512 for ; Mon, 15 Sep 2003 10:54:13 -0300 (ADT) Received: FROM resy5.fzk.de BY fzkmail2.fzk.de ; Mon Sep 15 15:54:16 2003 +0200 Received: œby rodos.fzk.de with ESMTP (8.8.6 (PHNE_17135)/8.7.1) id PAA22806; Mon, 15 Sep 2003 15:54:15 +0200 (METDST) Message-ID: <3F65C486.51EF6AF0@rodos.fzk.de> Date: Mon, 15 Sep 2003 15:54:14 +0200 From: Christoph Haller X-Mailer: Mozilla 4.77 [en] (X11; U; HP-UX B.10.20 9000/780) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org, valval@porta.net Subject: Re: PQconnectdb question Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Amavis-Alert: BAD HEADER Non-encoded 8-bit data (char 9C hex) in message header 'Received' Received: \234by rodos.fzk.de... ^ X-Archive-Number: 200309/30 X-Sequence-Number: 4448 > > could somebody show me a little example on this function > i have this parameters > PQconn connection; > char *user; > char *passw; > char *db; > char *server; > char *port; > > user="chrisvv"; > passw="mypass"; > db="sales"; > server="192.168.1.1"; > port="5432"; > is it right to do as follows > connection=PQconnectdb(user,passw,db,server,port); > .... how is the correct form of making a conection with user and passwd > parameters? > > connection= PQconnectdb("user=chrisvv password=mypass dbname=sales hostaddr=192.168.1.1 port=5432"); should work. You may want to refer to $PGSQLD/doc/html/libpq-connect.html Regards, Christoph