[VAStGoodie] Low-Level PostgreSQL wrapper

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

[VAStGoodie] Low-Level PostgreSQL wrapper

Postby marten » Sat Mar 14, 2009 12:48 pm

I added an interface for PostgreSQL to http://vastgoodies.com/. The interface has no support for the Abt database layer - but you may connect to the database, execute statements and handle return sets. As usual - work in progress. The connection to the database is done by wrapping the native "pqsql.dll" under Windows (this is different to the pure Smalltalk approach done by Squeak and VisualWorks) and by mixing static-future- and sync api-calls to this library. A small introduction can be read at http://www.schrievkrom.de/blog/?p=264
Marten Feldtmann, Principal Smalltalk User, Private
SkypeMe callto://marten.feldtmann
marten
[|]
 
Posts: 641
Joined: Sat Oct 14, 2006 7:10 am
Location: Hamburg - Germany

Re: Low-Level PostgreSQL wrapper

Postby marten » Fri Mar 20, 2009 2:29 am

marten wrote:I added an interface for PostgreSQL to http://vastgoodies.com/. The interface has no support for the Abt database layer - but you may connect to the database, execute statements and handle return sets. As usual - work in progress. The connection to the database is done by wrapping the native "pqsql.dll" under Windows (this is different to the pure Smalltalk approach done by Squeak and VisualWorks) and by mixing static-future- and sync api-calls to this library. A small introduction can be read at http://www.schrievkrom.de/blog/?p=264


After some additional days I published 0.0.19 today . This version works with 8.00 Beta1 and 7.52 and both under Windows and Linux. I tested this library under Ubuntu/AMD (with 32 bits libpg library installed (amazing that this works) - connecting against the localhost 64bit database). Due to fact, that now two platforms are supported, several refactoring had to be done (e.g. asParameter and asPSZ ...). First attempts to retrieve results in the binary result format are done (int32 and strings). It will be interesting to see, how the other datatypes (e.g. arrays of integers, points, polygons ...) are defined in the binary format - actually I did not find the specification for that.
Marten Feldtmann, Principal Smalltalk User, Private
SkypeMe callto://marten.feldtmann
marten
[|]
 
Posts: 641
Joined: Sat Oct 14, 2006 7:10 am
Location: Hamburg - Germany

Re: [VAStGoodie] Low-Level PostgreSQL wrapper

Postby dmacqueen » Mon Apr 13, 2009 2:14 pm

Hi Marten,

Do you, or anyone else, have any idea how much faster native db access is than going through an ODBC layer?

Thanks,

Donald
dmacqueen
[|]
 
Posts: 27
Joined: Fri Nov 02, 2007 3:40 pm

Re: [VAStGoodie] Low-Level PostgreSQL wrapper

Postby tc » Tue Apr 14, 2009 12:15 am

Hello,

http://www.orafaq.com/wiki/ODBC_FAQ
According to Oracle, their ODBC driver, on average, runs about 3% slower than native Oracle access.



--tc
tc
Moderator
 
Posts: 304
Joined: Tue Oct 17, 2006 7:40 am
Location: Raleigh, NC

Re: [VAStGoodie] Low-Level PostgreSQL wrapper

Postby marten » Sat Apr 18, 2009 4:18 am

dmacqueen wrote:Hi Marten,

Do you, or anyone else, have any idea how much faster native db access is than going through an ODBC layer?

Thanks,

Donald


I did not do this work due to speed problems. It's (for me) more difficult to write the binding against the ODBC layer and to fix
problems due to ODBC driver problems (which were there some times ago) or ODBC layer problems. You might connect against PostgreSQL using ODBC without problems - I simply did not test it any more.

The other consideration is, that you might need a direct wrapper to get access to all available data types (of that database)
and to have the most flexible way to distribute your application (without considering third-party ODBC drivers). Just the idea, to get a superb database connectivity and not a average one. I wanted to see, how multithreading can be used, how the expandable type management could be used and an easy application delivery mechanism was another wish.

After all: speed is not the problem. You will loose those milliseconds in Smalltalk system anyway ....


Marten
Marten Feldtmann, Principal Smalltalk User, Private
SkypeMe callto://marten.feldtmann
marten
[|]
 
Posts: 641
Joined: Sat Oct 14, 2006 7:10 am
Location: Hamburg - Germany


Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest