psqlODBC Configuration Options

Advanced Options 1/3 Dialog Box

Advanced Options 2/3 Dialog Box

Advanced Options 3/3 Dialog Box

Global settings Dialog Box

This dialog allows you to specify pre-connection/default logging options

Manage DSN Dialog Box

This dialog allows you to select which PostgreSQL ODBC driver to use for this connection. Note that this may not work with third party drivers.

How to specify as a connection option

There is a method of specifying a connection option in a keyword strings.

Example:VBA

Please refer to a keyword list for details.

Special characters and escaping in connection strings

A value that contains characters with a special meaning (;, =, spaces or braces) must be escaped. It is important to understand that a connection string is processed by two independent parsers, each with its own escaping rules.

1. The psqlODBC connection string

The driver splits the keyword string on ; (the attribute delimiter) and on the first = of each attribute. To include one of these characters, or a space, in a value, use one of the following:

A backslash (\) has no special meaning in the psqlODBC connection string itself; it is passed through literally.

2. The Libpq parameters (pqopt) value

The Libpq parameters option (see Advanced Options 3/3 above) is passed on to libpq and parsed by it as a conninfo string, which has its own, different rules. Within this value libpq separates parameters by spaces, so to include a space (or other special character) in a libpq parameter value you use libpq's escaping:

This is why, in the VBA example above, the libpq paths inside the D5={...} braces use backslashes: the braces are consumed by the psqlODBC parser (layer 1), and the contents are then handed to libpq (layer 2). The two layers can therefore both apply to the same value.