Here is a PostgreSQL database interface for Squeak, a wonderful Smalltalk implementation. In the spring of 2005, Leonardo Cecchi ( 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.



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.


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.


Fixed PSQLClient>>authenticate code that checks response to password command, thanks to Jess Balint (
Bug fixes and improvements by Leonardo Cecchi ( He has added SmalltalkX compatability and SUnit tests.
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> for the suggestions that led to these changes.
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.


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