From: Eric Hill <Eric.Hill@jmp.com>
To: pgsql-odbc@postgresql.org <pgsql-odbc@postgresql.org>
Subject: Windows driver sometimes returns connection string with two consecutive semicolons
Date: Fri, 19 Dec 2014 21:37:39 +0000
Message-ID: <dbea0b60b31b4cfca69e383f4627c6e2@MERCMBX41R.na.SAS.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>
Hey,
We cache connection strings in our application so we can know if you already have a connection to a given database. We ran into this:
Windows, Postgres driver version 9.03.03.
When you use the ODBC administrator (which we invoke programmatically by passing the empty string as the third argument to SQLDriverConnect()) to connect to Postgres, driver 9.03.03, the connection string you get back (5th argument) has an extra semicolon after "C2=dd_", to wit:
BI=0;C2=dd_;;CX=1c20502bb;
However, if you call SQLDriverConnect() passing in that connection string with the extra semicolon as the third argument, a connection is made, and the connection string you get back in the 5th param does *not* have the extra semicolon:
BI=0;C2=dd_;CX=1c20502bb;
Yes, I can work around this, but why not stop spitting out the extra semicolon in the first case?
Thanks!
Eric
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: Eric.Hill@jmp.com
Subject: Re: Windows driver sometimes returns connection string with two consecutive semicolons
In-Reply-To: <dbea0b60b31b4cfca69e383f4627c6e2@MERCMBX41R.na.SAS.com>
References: <dbea0b60b31b4cfca69e383f4627c6e2@MERCMBX41R.na.SAS.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox