On 30-Apr-08, at 10:42 AM, Robert Lawrence wrote:
> The password wasn't the "solution" but another part of the puzzle.
> However, I can work around the issue now using a password AND verifiy
> that the database it connects to is the one the user requested. I
> will consider it a failed connection unless both of those tests pass.
>
> There is still strange behavior from RB's PostgreSQLDatabase class. I
> can get the .Connect to return true even if the passwords are wrong --
> but it will then report connecting to the "postgres" database. So
> apparently I can only rely on .Connect to let me know that the server
> host and port is correct. I need to validate the requested database
> is connected (with select current_database() ) as well to ensure the
> suer/pass and database names are correct.
>
> Basically, I have a hack to work around the problem.
What does your pg_hba.conf file look like ?
If you have "trust" set it permits a connection rand seems to ignore
the DB you wanted to connect to (which is what my code was seeing)
With this entry
host all all 10.0.1.4/32 trust
I get a connection to the wrong database
With this entry
host all all 10.0.1.4/32 password
and the correct password in my RB code it connects to the db I
originally tried to connect to
So there is still something funky
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|