"Deniz Hastorun" <denizh(at)itu(dot)edu(dot)tr> writes:
> Error returned:ERROR: PQconnectdb() - Missing '=' after 'template1' in
> conninfo
PQconnectdb doesn't take a simple database name as argument; it takes
a string containing keyword=value pairs. The correct argument would
be something like "dbname=template1". See
http://www.postgresql.org/users-lounge/docs/7.0/postgres/libpq-chapter.htm#AEN22236
If you see anyplace in current documentation that indicates differently,
that's a documentation error --- please let us know about it!
regards, tom lane