OSDN Git Service

Fix PQsetdbLogin() backward compatibility problem.
authorTatsuo Ishii <ishii@postgresql.org>
Fri, 22 Dec 2000 07:59:32 +0000 (07:59 +0000)
committerTatsuo Ishii <ishii@postgresql.org>
Fri, 22 Dec 2000 07:59:32 +0000 (07:59 +0000)
commit1deb6e7d414f21e4adecdcc496252b0c594852f2
treeca3d83138fb42bfd23a3e24e93e8e09a8fb48885
parent317215fc55ae9ead960b3e1e79aa41fd004f7414
Fix PQsetdbLogin() backward compatibility problem.

If pghost == "" and pgport == "" then PQsetdbLogin() fails with a
error message:

 Is the postmaster running locally
        and accepting connections on Unix socket '/tmp/.s.PGSQL.0'?

I see many applications such as PHP fails due to this behavior.
Now if pgport == "", then it is assumed to be a DEF_PGPORT_STR. This
is the same behavior as the version prior 7.1.
src/interfaces/libpq/fe-connect.c