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... Installing -------- 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. 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? Testing ------ 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. tim -- tim Rowledge; [hidden email]; http://www.rowledge.org/tim I asked Mom if I was a gifted child ... she said they certainly wouldn't have paid for me. |
Hi Tim,
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. Great news. > > Warning - I know very little about databases. I probably don't even know the right words to use... > > Installing > -------- > 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 script: Installer ss project: 'PostgresV3'; addPackage: 'JSON'; addPackage: 'PostgresV3-Core'; addPackage: 'PostgresV3-Pool'; addPackage: 'PostgresV3-Json'; addPackage: 'PostgresV3-CodeMirror'; addPackage: 'PostgresV3-Help'; addPackage: 'PostgresV3-DBAPI'; addPackage: 'PostgresV3-Tests-Core'; addPackage: 'PostgresV3-Tests-Pool'; install. 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[1]) 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[2]. > > 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. > > Testing > ------ > 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 authentication failure). If you have any questions, Balázs and I are here to help. Levente [1] http://www.squeaksource.com/JSON.html [2] http://forum.world.st/Status-of-PostgresV3-td4780110.html#a4780666 > > > tim > -- > tim Rowledge; [hidden email]; http://www.rowledge.org/tim > I asked Mom if I was a gifted child ... she said they certainly wouldn't have paid for me. |
(Apologies for taking so long to reply to this; all sorts of server 'fun')
> On 2019-07-03, at 2:54 AM, Levente Uzonyi <[hidden email]> wrote: >> >> Installing >> -------- >> 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 script: > > Installer ss > project: 'PostgresV3'; > addPackage: 'JSON'; > addPackage: 'PostgresV3-Core'; > addPackage: 'PostgresV3-Pool'; > addPackage: 'PostgresV3-Json'; > addPackage: 'PostgresV3-CodeMirror'; > addPackage: 'PostgresV3-Help'; > addPackage: 'PostgresV3-DBAPI'; > addPackage: 'PostgresV3-Tests-Core'; > addPackage: 'PostgresV3-Tests-Pool'; > install. > > or you can use the Monticello Configuration: > > MCMcmUpdater updateFromRepository: 'http://squeaksource.com/PostgresV3'. OK; good to know but it would be helpful to have this easily findable. Could it at least go in the swiki page for the squeaksource project pages? And should I have found the MCMcmUpdater thing in the MCConfiguration browser - because I don't appear to be able to see anything in that, which strikes me as a possible problem. > > 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[1]) 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[2]. >> I suspect the CodeMirror stuff might prove useful. Today for the first time I was able to connect to a remote database (after much fun finding out which pg_hba.conf file we needed to edit and what to add to it) and retrieve data. Very cool. tim -- tim Rowledge; [hidden email]; http://www.rowledge.org/tim Useful random insult:- Has a one-way ticket on the Disoriented Express. |
In reply to this post by timrowledge
I've finally got to try out the http://www.squeaksource.com/PostgresV3 package and it's nearly kinda working. I think. SqueakMap? 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? |
> On 2019-07-10, at 9:16 AM, Chris Muller <[hidden email]> wrote: > > 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. > > SqueakMap? Oh absolutely that would help, but we've (well, I've) been having some trouble with making releases recently. It's still quite a bit of messing around to set up and update. It must be possible to make a whole lot simpler, somehow. As a fantasy, could we make it so that publishing something from MC with a box ticked would automagically Do The Dance? A one-step capability would make it more likely people would just do it. Simpler life for pretty much everyone. Less faffing around trying to see if something exists on source.squeak.org or SS3 or SS or git-whatever. tim -- tim Rowledge; [hidden email]; http://www.rowledge.org/tim Useful random insult:- So dumb, he faxes face up. |
Free forum by Nabble | Edit this page |