[squeak-dev] Testing PostgresV3
leves at caesar.elte.hu
Wed Jul 3 09:54:13 UTC 2019
On Tue, 2 Jul 2019, tim Rowledge wrote:
> I've finally got to try out the http://www.squeaksource.com/PostgresV3 package and it's nearly kinda working. I think.
> Warning - I know very little about databases. I probably don't even know the right words to use...
> This was a bit more tricky than I'd like because there is no immediately obvious advice on installing. First time I tried to load the "oh that looks a plausible root package" PostgresV3 but it actually locked up my image completely. So that's probably not the thing to load...
> Loading Core, Help & DBAPI seems to have installed a basic setup ok. It's certainly nice to have the Help package added to the system, but it would need quite a lot of expansion to assist DB-newbies like me.
Right. The "root" package is only there to keep the full history or the
project. It was split into multiple packages a while ago, but the "root"
package should still work in Squeak 4.3 and/or 4.4.
If you want to load everything there is, then use the following installer
or you can use the Monticello Configuration:
MCMcmUpdater updateFromRepository: 'http://squeaksource.com/PostgresV3'.
You definitely don't need everything from here. What you need depends on
what you want to achieve with the database and Squeak.
You'll need PostgresV3-Core for sure.
As its name suggests, PostgresV3-Pool contains a connection pool. It is
convenient to have one around, but if your application is single-threaded
and you want to write SQL queries as strings, then you can get away with
not setting up one.
The JSON (which is a fork of the original JSON package) and
the PostgresV3-Json packages provide JSON support (queries can have json
parameters and can return json objects).
PostgresV3-CodeMirror provides a way to interact with the database as an
API. There are functions you can call which can return objects/rows.
PostgresV3-DBAPI is a way to write SQL strings and execute them. I have
never really used it, because I prefer the API-way. Balázs wrote a mail
about the latter.
> Collectively we could do better with some sort of install guidance for packages on SqueakSource etc; I'm not sure what would really solve it. Perhaps a package called something obvious like 'install' that does loading or at least has a commit message that describes loading or... I know there is the whole 'ConfigurationOfBlah' stuff but how would one be expected to find one starting from SqueakSource? Some info on the package Wiki that SSrc provides would help too; perhaps even mentioning if SqueakMap has a nice installer ready to help?
Those would be really useful. If only it wouldn't be so cumbersome to
interact with SqueakMap.
> Almost worked! Got back an error saying the pg_hba.conf didn't know my IP, so someone at the office has to do magic. I'd guess that somewhere in PG3Connection>>#processStates one might benefit from checking the received message for error stuff.
Right, low-level error handling could be improved, but in such cases the
connection is usually closed by the server (as it was in your case due to
If you have any questions, Balázs and I are here to help.
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> I asked Mom if I was a gifted child ... she said they certainly wouldn't have paid for me.
More information about the Squeak-dev