Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Ues2o-0007FR-Vs for pgsql-general@arkaria.postgresql.org; Tue, 21 May 2013 19:16:23 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Ues2o-0000ce-G9 for pgsql-general@arkaria.postgresql.org; Tue, 21 May 2013 19:16:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Ues2n-0000cY-6O for pgsql-general@postgresql.org; Tue, 21 May 2013 19:16:21 +0000 Received: from hogranch.com ([75.101.82.47]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Ues2h-0003K9-60 for pgsql-general@postgresql.org; Tue, 21 May 2013 19:16:19 +0000 Received: from [192.168.0.2] (porker [192.168.0.2]) by hogranch.com (8.11.6/8.11.6) with ESMTP id r4LJG5l27143 for ; Tue, 21 May 2013 12:16:05 -0700 Message-ID: <519BC7F5.1010703@hogranch.com> Date: Tue, 21 May 2013 12:16:05 -0700 From: John R Pierce User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: pgsql-general@postgresql.org Subject: Re: [ODBC] ODBC constructs References: <519B14E7.3010806@vmware.com> In-Reply-To: Content-Type: multipart/alternative; boundary="------------080709090701040504060507" X-HawgScanner-Information: Please contact the ISP for more information X-HawgScanner: Found to be clean X-Pg-Spam-Score: -3.0 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org This is a multi-part message in MIME format. --------------080709090701040504060507 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 5/21/2013 11:58 AM, Dev Kumkar wrote: > Thanks everyone for sharing comments, really useful ones. Yes the > requirement is not connecting to other DBMS but only Postgres and > libpq is the correct way so far from comments here. Regarding libpq > performance wanted to discuss about connection polling like pgpool but > I think a separate post of performance will make sense. > for pooling, check out pgbouncer. IMHO its a better basic pooler than pg_pool. > So, coming back to the original question actually I am exploring on > both fronts here - libpq and psqlODBC. > Just one thought here, there is an existing ODBC business logic code > which is talking to sybase database and now same code need to be > ported to talk to postgres, then in this case will the use of psqlODBC > quick way? Otherwise porting of ODBC business logic to libpq > constructs needs to be done. > thats the perfect use case for ODBC. you'll probably still need to rework some of your SQL if you did stuff thats Sybase specific, but thats a lot less hassle than rewriting all the API calls. -- john r pierce 37N 122W somewhere on the middle of the left coast --------------080709090701040504060507 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
On 5/21/2013 11:58 AM, Dev Kumkar wrote:
Thanks everyone for sharing comments, really useful ones. Yes the requirement is not connecting to other DBMS but only Postgres and libpq is the correct way so far from comments here. Regarding libpq performance wanted to discuss about connection polling like pgpool but I think a separate post of performance will make sense.


for pooling, check out pgbouncer.   IMHO its a better basic pooler than pg_pool. 

So, coming back to the original question actually I am exploring on both fronts here - libpq and psqlODBC.
Just one thought here, there is an existing ODBC business logic code which is talking to sybase database and now same code need to be ported to talk to postgres, then in this case will the use of psqlODBC quick way? Otherwise porting of ODBC business logic to libpq constructs needs to be done.


thats the perfect use case for ODBC.    you'll probably still need to rework some of your SQL if you did stuff thats Sybase specific, but thats a lot less hassle than rewriting all the API calls.


-- 
john r pierce                                      37N 122W
somewhere on the middle of the left coast
--------------080709090701040504060507--