For PostgreSQL

pgsql://user:password@host[:port]|[local]/database?
   charset=value& [value is pgsql charset name]
   ClientCharset=charset&
   autocommit=1& [3.3.0]
   datestyle=value [valid values are ISO,SQL,Postgres,European,US,German. ISO by default]


Optional parameters:
port-port number.

One can also specify:
user:password@host:port/database,

or:
user:password@local/database

In latter case, Parser will connect to server established at local computer.

charset-right after connection executes "SET CLIENT_ENCODING=value";
ClientCharset-specifies the charset, in which Parser must communicate with SQL server. Conversion will be done by driver;
autocommit-by default Parser executes COMMIT after each sucessfull query. If option autocommit=0 was specified this behaviour will changed and all queries inside one connect operator will be executed in single transaction;
datestyle-if this parameter is specified, after connection the driver will executes "SET DATESTYLE=value"


Example
Assume, data in your database is stored in windows-1257, connect string should look like this:
mysql://user:password@host/database?ClientCharset=windows-1257


Copyright © 1997–2011 Art. Lebedev Studio | http://www.artlebedev.com Last updated: 15.04.2011