Case-sensitivity of connection string parameters

From: Mateusz Loskot <mateusz(at)loskot(dot)net>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Case-sensitivity of connection string parameters
Date: 2016-05-10 07:56:24
Message-ID: CABUeae-LLQXiR2dwir+qYPn-SDHM+h4h7DT8HVzrBpe+nJzyug@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hi,

I use the psqlODBC 9.2.1 with unixODBC 2.2.14 on Ubuntu 14.04.
Should I expect names of connection string parameters to be case-sensitive?

For instance, if I try DSN-less connection with the following connection
string passed to the ODBC API call SQLDriverConnect:

"Driver={PostgreSQL ANSI};Server=127.0.0.1;Database=test;UID=test;PWD=test;"

I get this error:

[unixODBC][Driver Manager]Data source name not found, and no default
driver specified

whereas if I try this one, with the upper-case DRIVER:

"DRIVER={PostgreSQL ANSI};Server=127.0.0.1;Database=test;UID=test;PWD=test;"

I get successfully connected.

I've couldn't find any details on the case sensitivity in the FAQ,
release notes or https://odbc.postgresql.org/docs/config-opt.html

The only cue might be the connection string in the VB example
at the bottom of this page, where DRIVER is specified in upper-case:
https://odbc.postgresql.org/docs/config.html

Another cue that suggests case-sensitivity might be important is from
the connection strings database:
https://www.connectionstrings.com/postgresql-odbc-driver-psqlodbc/
and it says:
"Please note that sslmode=require is case sensitive, it should be
written in lower case letters."

But, it is confusing since the https://odbc.postgresql.org/docs/config-opt.html
lists this parameter as "SSLmode", but not asd "sslmode".

Finally, I have tried psqlODBC 9.3.4 on Windows and there parameters work
regardless of their case.

Could anyone explain what case of each of the parameters is required useon Unix?

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Inoue, Hiroshi 2016-05-10 13:26:02 Re: Case-sensitivity of connection string parameters
Previous Message Venkatesan, Sekhar 2016-05-10 05:26:10 Re: PostgreSQL: SQLSetPos fails with SetPos update return error.