Thread: Re: [QUESTIONS] Connect to Postgres with pure TCL
(Thread redirected from the pg-questions list to the pg-interfaces) At 1:19 +0200 on 13/1/98, Paolo Cacciatori wrote: > I want use Postgres on a Linux box in an office where the clients are > running MacOS and Win95. > > With Tcl/Tk 8.0 is possible to write a front-end which run on all the > clients, but libpq and libpgtcl are available only for Unix. Porting > libpq to Mac and Windows is possible only for a programmer who knows > well these OS, while for a Tcl version is required only to know Tcl and > Postgres. I second the need. I also want to have a convenient Mac front-end to Postgres. I was thinking of looking into the adaptation of libpgtcl to PPC. This would require understanding how Tcl/Tk can be extended on the Mac. At the moment, I have no idea. I was inclined in this direction, however, because I'm more of a Mac programmer than a Tcl/Tk programmer. Actually, I've never used Tcl/Tk... However, your way would be much more logical, though I suspect a performance degredation if all the connections are done in the interpreted language itself. Another reason I'd like to see a Mac frontend is that it would give me an idea of what is expected of a GUI frontend in general. I'm toying with the idea of writing one in Java (or is there anybody else working on that?). Herouth
Herouth Maoz wrote: > > However, your way would be much more logical, though I suspect a > performance degredation if all the connections are done in the interpreted > language itself. I don't think so. SQL conversation mean some small messages for establishing protocol then sending the SQL command and after that receiving data. The most part of the time is taken by data transferring over the network. I would bet on a maximum 5% performance degrading. Tcl/Tk 8.0 would be the only version that could deal with binary i/o over files and sockets. In my opinion, it wouldn't be so hard to rewrite pg interface directly in Tcl. I would study that posibility and keep you informed. -- Constantin Teodorescu FLEX Consulting Braila, ROMANIA
Constantin Teodorescu wrote: > Herouth Maoz wrote: > > > > However, your way would be much more logical, though I suspect a > > performance degredation if all the connections are done in the > interpreted > > language itself. > > I don't think so. > SQL conversation mean some small messages for establishing protocol > then > sending the SQL command and after that receiving data. The most part > of > the time is taken by data transferring over the network. I would bet > on > a maximum 5% performance degrading. > > Tcl/Tk 8.0 would be the only version that could deal with binary i/o > over files and sockets. > > In my opinion, it wouldn't be so hard to rewrite pg interface directly > > in Tcl. > I would study that posibility and keep you informed. > Thanks. In the meantime I've done some test with Tcl/Tk 8.0 and I was able to make a connection and send a simple query over it. The hard part is extracting the data from the result. If you are interested I can send the rude code of my test, but I'm working with Tcl only from a week .... Paolo Cacciatori paolo@plavis.com
Paolo Cacciatori wrote: > > In the meantime I've done some test with Tcl/Tk 8.0 and I was able to > make a connection and send a simple query over it. The hard part is > extracting the data from the result. > > If you are interested I can send the rude code of my test, but I'm > working with Tcl only from a week .... Yes please. It would be perfect. Any information how the result is composed ? Fixed length, variable delimited with some special character ? -- Constantin Teodorescu FLEX Consulting Braila, ROMANIA
Constantin Teodorescu wrote: > Paolo Cacciatori wrote: > > > > In the meantime I've done some test with Tcl/Tk 8.0 and I was able > to > > make a connection and send a simple query over it. The hard part is > > extracting the data from the result. > > > > If you are interested I can send the rude code of my test, but I'm > > working with Tcl only from a week .... > > Yes please. It would be perfect. > Any information how the result is composed ? Fixed length, variable > delimited with some special character ? The code is on another computer, I will send it later by email. The only info about the structure of the result are from the code of libpg (in the file fe-exec.c). A better documentation would help, but I don't know if it exists. PS Your pgaccess is very useful for me, thanks for it. Paolo Cacciatori paolo@plavis.com
On Tue, 13 Jan 1998, Herouth Maoz wrote: > Another reason I'd like to see a Mac frontend is that it would give me an > idea of what is expected of a GUI frontend in general. I'm toying with the > idea of writing one in Java (or is there anybody else working on that?). There are several already in existence. Take a look at Gamelan. Also, as part of the other big project I have here (and the reason I started with the JDBC driver), I do have the beginings of a Java based front end sitting here. Depending on what my work load's like, I may have it ready by the time 6.3 is released. > Herouth -- Peter T Mount petermount@earthling.net or pmount@maidast.demon.co.uk Main Homepage: http://www.demon.co.uk/finder Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk