pg.ddx.io pgsql-interfaces@postgresql.org mailing list archivehelp / color / mirror / Atom feed
PQconnectdb question 2+ messages / 2 participants [nested] [flat]
* PQconnectdb question @ 2003-09-13 18:12 Christian Valverde <valval@porta.net> 0 siblings, 0 replies; 2+ messages in thread From: Christian Valverde @ 2003-09-13 18:12 UTC (permalink / raw) To: pgsql-interfaces 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? ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: PQconnectdb question @ 2003-09-15 13:54 Christoph Haller <ch@rodos.fzk.de> 0 siblings, 0 replies; 2+ messages in thread From: Christoph Haller @ 2003-09-15 13:54 UTC (permalink / raw) To: pgsql-interfaces; valval@porta.net > > 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 ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-09-15 13:54 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2003-09-13 18:12 PQconnectdb question Christian Valverde <valval@porta.net> 2003-09-15 13:54 Re: PQconnectdb question Christoph Haller <ch@rodos.fzk.de>
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