pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: markw@mohawksoft.com
To: Stephen Frost <sfrost@snowman.net>
Cc: pgsql-odbc@postgresql.org
Subject: Re: ODBC Rewrite
Date: Tue, 7 Dec 2004 09:55:23 -0500 (EST)
Message-ID: <16735.24.91.171.78.1102431323.squirrel@mail.mohawksoft.com> (raw)
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>

> * 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.



view thread (13+ messages)  latest in thread

Message-ID: <16735.24.91.171.78.1102431323.squirrel@mail.mohawksoft.com>
Permalink:  ../16735.24.91.171.78.1102431323.squirrel@mail.mohawksoft.com/
Also on:    postgresql.org/message-id/16735.24.91.171.78.1102431323.squirrel@mail.mohawksoft.com

 · 

reply

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: markw@mohawksoft.com, sfrost@snowman.net
  Subject: Re: ODBC Rewrite
  In-Reply-To: <16735.24.91.171.78.1102431323.squirrel@mail.mohawksoft.com>
  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> <16735.24.91.171.78.1102431323.squirrel@mail.mohawksoft.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