Thread: hacked unixodbc driver..

hacked unixodbc driver..

From
"George Henry C. Daswani"
Date:
Hello,
   I hacked the unix odbc driver that comes with the postgresql 6.5
snapshots and incorporated the GetPrivateProfileString Parsing functions
from the IODBC driver manager (libiodbc-2.50.2).  The current unix odbc
driver that comes with postgresql has a very buggy GetPrivateProfileString
and it dumps core from time to time, plus it's not too compatible with tabs
and nulls on fields which the libiodbc GetPrivateProfileString doesn't have
a problem with.  It also incorporates the latest odbc src (windows)..

I've used this driver with Solaris X86 2.7 / RedHat linux 6.0 without any
problems...
It also works great with PHP 3.0.9 and DBD-ODBC-20.. :)  This way I can run
the same php scripts on both windows and linux/solaris platforms.. :)

you will need http://www.openlinksw.com/iodbc and download the latest iodbc
driver manager..
(2.50.2) compile and install it, make sure it puts it's odbc.ini in /etc

grab the hacked unix odbc driver from
http://www.odc.net/~gdaswani/sources/odbc.tar.gz
tar -zxvf the file on your ~postgresql-snapshot src/interfaces dir..

The remake postgres with
./configure --prefix=FILLINPREFIX --with-odbc --with-odbcinst=/etc

an example odbc.ini file.

/etc/odbc.ini
;
;
;
[ODBC Data Sources]
Openlink = Openlink (MT)
template1 = template1

[template1]
Driver    = /opt/pgsql/lib/libpsqlodbc.so
Description    = PostgreSQL Template1 Database
Servername    = localhost
Username    =
Password    =
Database    = template1
Protocol    = 6.4
Options    =
ReadOnly    = no
Debug    = 0
Comm    = 1

(If Debug = 1, puts debugging info on /tmp and if Comm = 1, puts debugging
info on /tmp)..

George Daswani



Re: [INTERFACES] hacked unixodbc driver..

From
Thomas Lockhart
Date:
> I hacked the unix odbc driver that comes with the postgresql 6.5
> snapshots and incorporated the GetPrivateProfileString Parsing functions
> from the IODBC driver manager (libiodbc-2.50.2).

The iODBC code was submitted to Postgres way too close to the release
date to be incorporated into our code tree. Can we restart the
discussion on this in a few days, after the v6.5 release cycle has
settled down? Once we know what we are going to do, then we can post
patches on the plain v6.5 release and update the cvs tree to reflect
both Peter Harvey's and your contributions, and to make sure we are
back in sync with Byron's non-cvs code tree.

Regards.
                  - Thomas

-- 
Thomas Lockhart                lockhart@alumni.caltech.edu
South Pasadena, California


Re: [INTERFACES] hacked unixodbc driver..

From
Sergio Kessler
Date:
is that nobody who hack the ODBC driver know how to make
diffs files ?

This is getting annoying, first the guy (from UnixODBC, I think) 
who introduces itself on this list saying:

"Hey, I want write cvs access on the tree or I will make
a fork of the odbc driver ..."

without even asking who is the driver mantainer, etc ...
very, very polite ...

Now, there is Daswani, who say (more or less):

"I've hacked the odbc driver, you want the changes ?,
download this..." (the whole driver)

Please, people, this is not how the Open Source work, there
must be a _little_ more cooperation, if anybody will make their
own with the driver, things will go crazy, really crazy.

Just a:
"Hi, I've hacked the driver, the changes are ..., here is the patch."

would be excellent.

btw, I would like to see Byron (the current maintainer) to say
something about their situation with respect to the driver
(last time he was a little complicated with their personal
situation, hope he is better now).

Sergio


RE: [INTERFACES] hacked unixodbc driver..

From
"Peter Harvey"
Date:
Hi,

Relax. OpenSource maintainers can simply say that we only accept patchs and
we only give out cvs write access to those who have submitted some quality
patchs. Thomas said as much to me.

Any developer who feels that creating a code fork is easier than dealing
with the maintainer than they should go ahead and do so. I say this, not
because I like code forks, but because I know of projects (this is not one
of them) which have maintainers who continue to control code long past when
they are really able to commit any time to do the job.

re. unixODBC

I prefer to 'mirror' some driver source. This way I can make any changes and
enhancements to ensure it meets some tests (ie works with StarOffice) and
ensure that it is availible to unixODBC users while I wait for changes to be
accepted by the source maintainers.

The problem with ODBC is that nonone has been handling it holistically... at
least no OpenSource developers and this is exactly what is required to get
ODBC moving on UNIX/Linux. This is why I started unixODBC.

The plan is to be less holistic when unixODBC 1.0 comes out. In other words;
the focus will return to things like the DM and drivers will go through
compliance tests. The compliance tests will be sent to driver source
maintainers and they can do what they want with the info... unixODBC
developers will not try to fix all drivers out there.

Having said all of that... I have offered to do the patch submissions when
asked (ie when PostgreSQL folks are ready).

Also note; a number of iODBC and unixODBC developers are currently working
on actual code changes and enhancements to get ODBC into KDE. This should be
very healthy and will likely see something of a merge between the two.

Peter Harvey

BTW: Please do not discourage George, or any other developer, from spending
time on PostgreSQL or any other project. Developers such as George deserve
some lee-way because they spend a great deal of their time on this stuff for
free. I often have to remind myself that I am working with a group of
volunteers... not paid employees... it always changes the tone of my emails.



> -----Original Message-----
> From: owner-pgsql-interfaces@postgreSQL.org
> [mailto:owner-pgsql-interfaces@postgreSQL.org]On Behalf Of Sergio
> Kessler
> Sent: Saturday, January 08, 2000 1:53 PM
> To: George Henry C. Daswani
> Cc: pgsql-interfaces@postgreSQL.org
> Subject: Re: [INTERFACES] hacked unixodbc driver..
>
>
>
> is that nobody who hack the ODBC driver know how to make
> diffs files ?
>
> This is getting annoying, first the guy (from UnixODBC, I think)
> who introduces itself on this list saying:
>
> "Hey, I want write cvs access on the tree or I will make
> a fork of the odbc driver ..."
>
> without even asking who is the driver mantainer, etc ...
> very, very polite ...
>
> Now, there is Daswani, who say (more or less):
>
> "I've hacked the odbc driver, you want the changes ?,
> download this..." (the whole driver)
>
> Please, people, this is not how the Open Source work, there
> must be a _little_ more cooperation, if anybody will make their
> own with the driver, things will go crazy, really crazy.
>
> Just a:
>
>  "Hi, I've hacked the driver, the changes are ..., here is
>  the patch."
>
> would be excellent.
>
> btw, I would like to see Byron (the current maintainer) to say
> something about their situation with respect to the driver
> (last time he was a little complicated with their personal
> situation, hope he is better now).
>
> Sergio
>
>



Re: [INTERFACES] hacked unixodbc driver..

From
"George Henry C. Daswani"
Date:
It would be great to make diff files and give it to the postgresql
maintainers but at this
point, I really wouldn't want this driver to be used and entered into the
cvs without testing..
It works great for me, and let's me run the exact same php and perl dbd-odbc
code on
windows / linux / and solaris..  Steve Harvey is working on his excellent
unixODBC package
and I believe it's great, in the meantime it doesn't work too well with
solaris and when the time comes that it works - it would be nice that it
get's incorporated into the postgresql source tree..
At this time, the driver hack works okay for me, and doesn't stop me from
using postgresql with odbc - when the time comes that unixodbc works on
solaris, i'll be a happy camper.  In the meantime, I surely won't lodbc, and
dbd-odbc.  I'm pretty sure there's other people out there who would like the
same..  I'd rather not use dbd-pg or php-pg because I also use the exact
same code on an informix database using openlink odbc..et a broken
GetPrivateProfileString parser from the current postgresql snapshot stop me
from using php-

George Daswani..


>
> is that nobody who hack the ODBC driver know how to make
> diffs files ?
>
> This is getting annoying, first the guy (from UnixODBC, I think)
> who introduces itself on this list saying:
>
> "Hey, I want write cvs access on the tree or I will make
> a fork of the odbc driver ..."
>
> without even asking who is the driver mantainer, etc ...
> very, very polite ...
>
> Now, there is Daswani, who say (more or less):
>
> "I've hacked the odbc driver, you want the changes ?,
> download this..." (the whole driver)
>
> Please, people, this is not how the Open Source work, there
> must be a _little_ more cooperation, if anybody will make their
> own with the driver, things will go crazy, really crazy.
>
> Just a:
>
>  "Hi, I've hacked the driver, the changes are ..., here is
>  the patch."
>
> would be excellent.
>
> btw, I would like to see Byron (the current maintainer) to say
> something about their situation with respect to the driver
> (last time he was a little complicated with their personal
> situation, hope he is better now).
>
> Sergio
>



Re: [INTERFACES] hacked unixodbc driver..

From
"George Henry C. Daswani"
Date:
It would be great to make diff files and give it to the postgresql
maintainers but at this
point, I really wouldn't want this driver to be used and entered into the
cvs without testing..
It works great for me, and let's me run the exact same php and perl dbd-odbc
code on
windows / linux / and solaris..  Steve Harvey is working on his excellent
unixODBC package
and I believe it's great, in the meantime it doesn't work too well with
solaris and when the time comes that it works - it would be nice that it
get's incorporated into the postgresql source tree..
At this time, the driver hack works okay for me, and doesn't stop me from
using postgresql with odbc - when the time comes that unixodbc works on
solaris, i'll be a happy camper.  In the meantime, I surely won't lodbc, and
dbd-odbc.  I'm pretty sure there's other people out there who would like the
same..  I'd rather not use dbd-pg or php-pg because I also use the exact
same code on an informix database using openlink odbc.

George Daswani..


>
> is that nobody who hack the ODBC driver know how to make
> diffs files ?
>
> This is getting annoying, first the guy (from UnixODBC, I think)
> who introduces itself on this list saying:
>
> "Hey, I want write cvs access on the tree or I will make
> a fork of the odbc driver ..."
>
> without even asking who is the driver mantainer, etc ...
> very, very polite ...
>
> Now, there is Daswani, who say (more or less):
>
> "I've hacked the odbc driver, you want the changes ?,
> download this..." (the whole driver)
>
> Please, people, this is not how the Open Source work, there
> must be a _little_ more cooperation, if anybody will make their
> own with the driver, things will go crazy, really crazy.
>
> Just a:
>
>  "Hi, I've hacked the driver, the changes are ..., here is
>  the patch."
>
> would be excellent.
>
> btw, I would like to see Byron (the current maintainer) to say
> something about their situation with respect to the driver
> (last time he was a little complicated with their personal
> situation, hope he is better now).
>
> Sergio
>



Re: [INTERFACES] hacked unixodbc driver..

From
Peter Harvey
Date:
> windows / linux / and solaris..  Steve Harvey is working on his excellent
> unixODBC package
> and I believe it's great, in the meantime it doesn't work too well with
> solaris and when the time comes that it works - it would be nice that it
> get's incorporated into the postgresql source tree..

George,

Hang tight on Solaris... the plan was to wait until unixODBC 1.0 (on Linux)
before making the minor changes required to get it to work on Solaris etc. I
have a Solaris/Sparc and a Solaris/Intel install here for this reason. Its
probably going to happen sooner now that unixODBC is making its way into KDE
2.0.

Thanks for your insight!

Peter Harvey

BTW: Nick has uploaded some fixs for you at... (
ftp://ftp.easysoft.com/pub/beta/unixODBC/unixODBC-DM-1.0.8.tgz ). Please let me
know if this does not fix your php problems on Linux. Also note; we are having
problems with the unixODBC cvs AND we are trying to get this stuff into KDE...
so we may be a bit delayed in getting quick fixs out over the next week or two.