From: | Monika Farkasova <farkasov(at)intrak(dot)tuke(dot)sk> |
---|---|
To: | pgsql-admin(at)postgresql(dot)org |
Subject: | What does "pgoptions" should contain in C - function PQsetdb |
Date: | 1998-12-09 18:30:39 |
Message-ID: | Pine.LNX.3.96.981209190040.30967B-100000@alfa.intrak.tuke.sk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Hello,
I work with postgresql-6.3.2-10 on Linux Redhat 5.2
In simple example of database connection in C-language (in
documentation) you set the pgoptions=NULL. It works.
How cat I say to function
PQsetdb(char * pghost, char * pgport, char *pgoptions, char * pgtty,
char * dbName);
that I want to connect database as user=someone and with password=
something.
example:
char *pghost, *pgport, *pgoptions, *pgtty, *dbName;
pghost="hron.fei.tuke.sk";
pgport="5432";
pgoptions="??????????";
pgtty=NULL;
dbName="student"
PQsetdb(pghost,pgport,pgoptions,pgtty,dbName);
What does the "pgoptions" contain and what is the syntax instead of NULL.
In dba.conf I have set the password passwordfile.
I tryed to use the syntax of PHP function for postgres:
pg_Connect("dbname=db user=someone password=something");
in C function as:
PQsetdb("dbname=db user=someone password=something");
but it does not work.
I can not use the PQOPTION in psql, too.
Monika Farkasova
From | Date | Subject | |
---|---|---|---|
Next Message | Monika Farkasova | 1998-12-10 10:45:29 | |
Previous Message | Frederic Nourry | 1998-12-09 13:06:59 | Database Security |