From: Christoph Haller <ch@rodos.fzk.de>
To: pgsql-interfaces@postgresql.org
To: valval@porta.net
Subject: Re: PQconnectdb question
Date: Mon, 15 Sep 2003 15:54:14 +0200
Message-ID: <3F65C486.51EF6AF0@rodos.fzk.de> (raw)
>
> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: ch@rodos.fzk.de, valval@porta.net
Subject: Re: PQconnectdb question
In-Reply-To: <3F65C486.51EF6AF0@rodos.fzk.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox