PostgreSQL supports URI formatted connection strings
Since 9.2, PostgreSQL handles URI formatted connection strings [1], so Database.connect method [2] doesn't need to parse the connection string when PostgreSQL version is greater than 9.2.
- Advantage: removing call to 'parse_uri' method would allow to handle all parameters supported by PostgreSQL [3].
- Drawback: PostgreSQL version 9.0 et 9.1 doesn't handle URI
PostgreSQL handles "postgresql://" and "postgres://" as URI scheme designator and Tryton handles only "postgresql://". This drawback could be mitigated keeping the current behavior with URIs starting with "postgresql://" and removing the parsing for URIs starting with "postgres://".
[1] http://www.postgresql.org/docs/9.2/static/libpq-connect.html#LIBPQ-CONNSTRING
[2] http://hg.tryton.org/trytond/file/e9be93892bda/trytond/backend/postgresql/database.py#l63
[3] http://www.postgresql.org/docs/9.2/static/libpq-connect.html#LIBPQ-PARAMKEYWORDS
[4] http://www.postgresql.org/support/versioning/