Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y25FC-0002GG-8L for pgsql-odbc@arkaria.postgresql.org; Fri, 19 Dec 2014 21:37:54 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Y25FB-0000xt-P3 for pgsql-odbc@arkaria.postgresql.org; Fri, 19 Dec 2014 21:37:53 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Y25FA-0000xm-O5 for pgsql-odbc@postgresql.org; Fri, 19 Dec 2014 21:37:52 +0000 Received: from mail-bl2on0627.outbound.protection.outlook.com ([2a01:111:f400:fc09::627] helo=na01-bl2-obe.outbound.protection.outlook.com) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y25F5-0007bj-Sk for pgsql-odbc@postgresql.org; Fri, 19 Dec 2014 21:37:50 +0000 Received: from BL2PR05CA0033.namprd05.prod.outlook.com (10.255.226.33) by BN1PR05MB504.namprd05.prod.outlook.com (10.141.59.150) with Microsoft SMTP Server (TLS) id 15.1.31.17; Fri, 19 Dec 2014 21:37:41 +0000 Received: from BN1AFFO11FD033.protection.gbl (2a01:111:f400:7c10::148) by BL2PR05CA0033.outlook.office365.com (2a01:111:e400:c04::33) with Microsoft SMTP Server (TLS) id 15.1.36.22 via Frontend Transport; Fri, 19 Dec 2014 21:37:40 +0000 Received: from mercav05r.na.sas.com (149.173.6.149) by BN1AFFO11FD033.mail.protection.outlook.com (10.58.52.246) with Microsoft SMTP Server (TLS) id 15.1.26.17 via Frontend Transport; Fri, 19 Dec 2014 21:37:40 +0000 X-TM-IMSS-Message-ID: <8126c8b10002bee3@mercav05r.na.sas.com> Received: from MERCMBX45R.na.SAS.com ([10.16.20.114]) by mercav05r.na.sas.com ([10.16.10.186]) with ESMTP (TREND IMSS SMTP Service 7.1; TLSv1/SSLv3 AES256-SHA (256/256)) id 8126c8b10002bee3 ; Fri, 19 Dec 2014 16:37:40 -0500 Received: from MERCMBX41R.na.SAS.com (10.16.20.110) by MERCMBX45R.na.SAS.com (10.16.20.114) with Microsoft SMTP Server (TLS) id 15.0.995.29; Fri, 19 Dec 2014 16:37:39 -0500 Received: from MERCMBX41R.na.SAS.com ([10.16.20.110]) by MERCMBX41R.na.SAS.com ([10.16.20.110]) with mapi id 15.00.0995.028; Fri, 19 Dec 2014 16:37:39 -0500 From: Eric Hill To: "pgsql-odbc@postgresql.org" Subject: Windows driver sometimes returns connection string with two consecutive semicolons Thread-Topic: Windows driver sometimes returns connection string with two consecutive semicolons Thread-Index: AdAb0t2B59D/iMAaRbCBfa4SYf6l4Q== Date: Fri, 19 Dec 2014 21:37:39 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.44.16.137] Content-Type: multipart/alternative; boundary="_000_dbea0b60b31b4cfca69e383f4627c6e2MERCMBX41RnaSAScom_" MIME-Version: 1.0 X-EOPAttributedMessage: 0 Received-SPF: Pass (protection.outlook.com: domain of jmp.com designates 149.173.6.149 as permitted sender) receiver=protection.outlook.com; client-ip=149.173.6.149; helo=mercav05r.na.sas.com; Authentication-Results: spf=pass (sender IP is 149.173.6.149) smtp.mailfrom=Eric.Hill@jmp.com; X-Forefront-Antispam-Report: CIP:149.173.6.149; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(438002)(189002)(41574002)(199003)(450100001)(19580395003)(99396003)(120916001)(229853001)(77096005)(19625215002)(77156002)(21056001)(2900100001)(50986999)(33186001)(512954002)(54356999)(107046002)(87936001)(2656002)(16236675004)(64706001)(46102003)(4396001)(19300405004)(33646002)(71186001)(102836002)(31966008)(110136001)(107886001)(92726002)(15975445007)(62966003)(20776003)(6806004)(108616004)(106466001)(86362001)(2351001)(92566001)(4546003)(24736002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR05MB504; H:mercav05r.na.sas.com; FPR:; SPF:Pass; MLV:sfv; PTR:mercav05r.na.sas.com; MX:1; A:1; LANG:en; X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BN1PR05MB504; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:BN1PR05MB504; X-Forefront-PRVS: 0430FA5CB7 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:BN1PR05MB504; X-OriginatorOrg: jmp.com X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org --_000_dbea0b60b31b4cfca69e383f4627c6e2MERCMBX41RnaSAScom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hey, We cache connection strings in our application so we can know if you alread= y 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 pa= ssing the empty string as the third argument to SQLDriverConnect()) to conn= ect to Postgres, driver 9.03.03, the connection string you get back (5th ar= gument) has an extra semicolon after "C2=3Ddd_", to wit: BI=3D0;C2=3Ddd_;;CX=3D1c20502bb; However, if you call SQLDriverConnect() passing in that connection string w= ith the extra semicolon as the third argument, a connection is made, and th= e connection string you get back in the 5th param does *not* have the extra= semicolon: BI=3D0;C2=3Ddd_;CX=3D1c20502bb; Yes, I can work around this, but why not stop spitting out the extra semico= lon in the first case? Thanks! Eric --_000_dbea0b60b31b4cfca69e383f4627c6e2MERCMBX41RnaSAScom_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hey,

 

We cache connection strings in our application so we= can know if you already have a connection to a given database.  We ra= n 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 SQLD= riverConnect()) to connect to Postgres, driver 9.03.03, the connection stri= ng you get back (5th argument) has an extra semicolon after “C2=3Ddd_”, to wit:

 

BI=3D0;C2=3Ddd_;;CX=3D1c20502bb;

 

However, if you call SQLDriverConnect() passing in t= hat connection string with the extra semicolon as the third argument, a con= nection is made, and the connection string you get back in the 5th param does *not* have the extra semicolon:

 

BI=3D0;C2=3Ddd_;CX=3D1c20502bb;

 

Yes, I can work around this, but why not stop spitti= ng out the extra semicolon in the first case?

 

Thanks!

 

Eric

--_000_dbea0b60b31b4cfca69e383f4627c6e2MERCMBX41RnaSAScom_--