PDA

View Full Version : PDO Can not connect Pgsql ,when pg port is not 5432.


junphine
08-31-2009, 03:53 AM
check the source ,it seems have a bug in

DataSource getPgsqlDataSource(Env env, String dsn){

StringBuilder url = new StringBuilder();
url.append("jdbc:postgresql://");
url.append(host);

if (port != null){
url.append(port);
}

url.append('/');
url.append(dbname);

}


should add "url.append(':')" before "url.append(port)".

nam
09-10-2009, 01:24 AM
Thanks for letting us know. I've filed a bug report for this at:

http://bugs.caucho.com/view.php?id=3683

It's an easy fix :P but I'm filing it anyways so you can keep track of it.