Here is a PostgreSQL database interface for Squeak, a wonderful Smalltalk implementation. In the spring of 2005, Leonardo Cecchi (l.cecchi@mind-informatica.com) greatly improved upon the code by fixing some bugs, adding SmalltalkX compatability, and creating SUnit tests.

See the class comments for PSQLClient and the class methods PSQLClient class>>example1 and PSQLClient class>>example2.

Files

Installing

File-in the following files in the order they are listed above (config, back end, front end, PostgreSQL, and test).

Edit PSQLConfiguration class>>initialize to reflect your version of Smalltalk (#smalltalkx or #squeak), then run that method.

Testing

Before running the unit tests, make sure to read the comments in PSQLTestConfiguration class>>documentation. They tell you what table you need to create in your test database and how to tell the tests which database to use.

News

2006-01-07
Fixed PSQLClient>>authenticate code that checks response to password command, thanks to Jess Balint (jbalint@gmail.com).
2005-06-26
Bug fixes and improvements by Leonardo Cecchi (l.cecchi@mind-informatica.com). He has added SmalltalkX compatability and SUnit tests.
2003-07-11
This update adds the missing method PSQLBMNoticeResponse>>message. It also adds new messages PSQLClient>>query:onError:onNotice: and PSQLClient>>query:onNotice:. Either block may be nil. The default error block calls Object>>error: and the default notice block calls Object>>inform:. Thanks to Guillaume Pothier <gpothier at free.fr> for the suggestions that led to these changes.
2003-05-09
This update adds user error handling. The new method PSQLClient>>query:onError: takes a block that gets called when something goes wrong. The block is passed the error message string.

License

This Squeak PostgreSQL database interface is Copyright © 2005–2006 by Jim Menard. It is copyrighted free software released under the Apache Software License, Version 2.0, a copy of which may be found at http://www.apache.org/LICENSE.txt.