X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 73B573A61DD for ; Tue, 7 Dec 2004 14:33:02 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 88192-06 for ; Tue, 7 Dec 2004 14:32:51 +0000 (GMT) Received: from outland.mohawksoft.com (unknown [64.46.156.80]) by svr1.postgresql.org (Postfix) with ESMTP id E3DDA3A5645 for ; Tue, 7 Dec 2004 14:32:54 +0000 (GMT) Received: (from mohawk@localhost) by outland.mohawksoft.com (8.11.6/8.11.6) id iB7EtNM22165; Tue, 7 Dec 2004 09:55:23 -0500 From: markw@mohawksoft.com X-Authentication-Warning: outland.mohawksoft.com: mohawk set sender to markw@mohawksoft.com using -f Received: from 24.91.171.78 (SquirrelMail authenticated user markw) by mail.mohawksoft.com with HTTP; Tue, 7 Dec 2004 09:55:23 -0500 (EST) Message-ID: <16735.24.91.171.78.1102431323.squirrel@mail.mohawksoft.com> In-Reply-To: <20041207141638.GP10437@ns.snowman.net> References: <16716.24.91.171.78.1102428945.squirrel@mail.mohawksoft.com> <20041207140239.GO10437@ns.snowman.net> <16608.24.91.171.78.1102430134.squirrel@mail.mohawksoft.com> <20041207141638.GP10437@ns.snowman.net> Date: Tue, 7 Dec 2004 09:55:23 -0500 (EST) Subject: Re: ODBC Rewrite To: "Stephen Frost" Cc: pgsql-odbc@postgresql.org User-Agent: SquirrelMail/1.4.2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.178 tagged_above=0 required=5 tests=NO_REAL_NAME X-Spam-Level: X-Archive-Number: 200412/26 X-Sequence-Number: 4760 > * markw@mohawksoft.com (markw@mohawksoft.com) wrote: >> > * markw@mohawksoft.com (markw@mohawksoft.com) wrote: >> >> Looking at both ODBC and libpq and I think that the difference is >> that >> >> libpq aims to make PostgreSQL interfacing easy, while ODBC strives to >> be >> >> a >> >> comprehensive SQL interface. 99% of what will be done with the ODBC >> >> interface will be simple SQLAllocStmt, SQLPrepare, and SQLExecute. >> > >> > Saying what 99% of what the ODBC driver does isn't terribly useful- >> > What's that 1% that libpq can't do? Having looked at the code, can >> you >> > give us an idea on that? >> >> Off the top of my head, binding data to the SQL statement, reusing >> statements, stuff like that. > > Isn't this handled by PQexecParams and PQexecPrepared? I had forgotten about those, but I was thinking more along the lines of SQLBindCol. > >> The ODBC API isn't designed to talk to any one database, so there are no >> short cuts. Unfortunately, applications based on ODBC assume there are >> no >> short cuts, and rely on that behavior. > > That's not particularly relevant- the question is if the existing libpq > API is sufficient for the ODBC driver or not. You should take a look at: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcodbc_api_reference.asp There are a lot of things that would have to be synthisized using libpq, but could be handled better using some of the primitives. There were some things that Dave mentioned, but they escape me at the moment.