Thread: A How-To: PostgreSQL from Tcl via ODBC
A friend asked me to figure out how to access PostgreSQL from Tcl via ODBC. For posterity, here's the step by step "how I did it" that I emailed to him. I don't know Tcl, this was just about getting the compile options correct and doing the proper sysadminning to make things work. Comments, suggestions and clarifications appreciated, hopefully this will save the next person going through the pain a few steps: http://www.flutterby.com/archives/2001_Feb/19_PostgreSQLfromTclwithODBC.html
Hooray! These instructions are just what an almost-novice needs. With the exception of changing the password to 'postgresql', the procedures started smoothly. Ran into a hitch at 'make' which reported that 'bison' was not installed. I'm running debian potato, so used the apt-get install of bison. Bison is installed in /usr/bin. I copied it to /home/billb/pgsql. Still getting the 'bison missing' message. Can anyone show me the error of my ways. TIA Bill --- Dan Lyke <danlyke@flutterby.com> wrote: > A friend asked me to figure out how to access > PostgreSQL from Tcl via > ODBC. For posterity, here's the step by step "how I > did it" that I > emailed to him. I don't know Tcl, this was just > about getting the > compile options correct and doing the proper > sysadminning to make > things work. > > Comments, suggestions and clarifications > appreciated, hopefully this > will save the next person going through the pain a > few steps: > > http://www.flutterby.com/archives/2001_Feb/19_PostgreSQLfromTclwithODBC.html __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
Bill Barnes <kgbsoft@yahoo.com> writes: > Ran into a hitch at 'make' which reported that 'bison' > was not installed. I'm running debian potato, so used > the apt-get install of bison. Bison is installed in > /usr/bin. I copied it to /home/billb/pgsql. > Still getting the 'bison missing' message. Re-run configure, and watch to make sure that it finds bison this time. You'll need flex too, if you intend to build from CVS sources. regards, tom lane
> Ran into a hitch at 'make' which reported that 'bison' > was not installed. I'm running debian potato, so used > the apt-get install of bison. Bison is installed in > /usr/bin. I copied it to /home/billb/pgsql. > > Still getting the 'bison missing' message. You need to remove config.cache before reconfiguring. Here's a hint for all who are getting PostgreSQL from CVS, are anyone else really: Run configure with --cache=/dev/null. There is never a reason why you would need that cache, and there is an infinite number of reasons why you don't want it. It's going to save you a lot of head aches. -- Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/
Thanks. That cleared the bison problem. flex didn't work the same way though. Copied it also to /home/billb/pgsql. Reported missing. Needs to go someplace else? TIA Bill --- Tom Lane <tgl@sss.pgh.pa.us> wrote: > Bill Barnes <kgbsoft@yahoo.com> writes: > > Ran into a hitch at 'make' which reported that > 'bison' > > was not installed. I'm running debian potato, so > used > > the apt-get install of bison. Bison is installed > in > > /usr/bin. I copied it to /home/billb/pgsql. > > > Still getting the 'bison missing' message. > > Re-run configure, and watch to make sure that it > finds bison this time. > You'll need flex too, if you intend to build from > CVS sources. > > regards, tom lane __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
Bill Barnes <kgbsoft@yahoo.com> writes: > Thanks. That cleared the bison problem. > flex didn't work the same way though. Copied it also > to /home/billb/pgsql. Reported missing. Needs to go > someplace else? Hmm, should work the same: configure will find it if it's in your PATH. regards, tom lane
Tom Lane writes: > Re-run configure, and watch to make sure that it finds bison this time. > You'll need flex too, if you intend to build from CVS sources. And if you're going to use the ODBC drivers under Linux (or any other OS that links C "strings" into read only memory) you'll need pretty recent CVS sources. One of the bugs I had to track down even though my original CVS update was only a few weeks old. Dan
Bill Barnes writes: > Ran into a hitch at 'make' which reported that 'bison' > was not installed. I'm running debian potato, so used > the apt-get install of bison. Bison is installed in > /usr/bin. I copied it to /home/billb/pgsql. I'm a Debian user too, but I had bison installed. Remove it from /home/billb/pgsql (as long as it's in your path things should be okay), and try running "configure" again. Dan
Many, many thanks to Dan, Peter, Tom. Best day I've had in some time. Deleted the config.cache and added cache=/dev/null to configure. Went swimmingly from there thru the first tests. Now on to the client setups. Thanks again. Bill --- Dan Lyke <danlyke@flutterby.com> wrote: > Bill Barnes writes: > > flex didn't work the same way though. Copied it > also > > to /home/billb/pgsql. Reported missing. Needs to > go > > someplace else? > > Nope. Don't bother copying it over (in fact remove > it from > /home/billb/pgsql 'cause that'll just confuse you > when you upgrade > your OS later), just run configure again. > > Dan __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
Dan Lyke <danlyke@flutterby.com> writes: > Bill Barnes writes: >> Ran into a hitch at 'make' which reported that 'bison' >> was not installed. I'm running debian potato, so used >> the apt-get install of bison. Bison is installed in >> /usr/bin. I copied it to /home/billb/pgsql. > I'm a Debian user too, but I had bison installed. Remove it from > /home/billb/pgsql (as long as it's in your path things should be > okay), and try running "configure" again. Yeah, if it's in your path to begin with then it shouldn't be necessary to copy it (and it's hard to believe that /usr/bin isn't in your path). I suspect Peter Eisentraut had the right answer: flush the config.cache file before running configure, else it'll reuse its previous result about whether bison exists. regards, tom lane
Now have this installation running on Mandrake 7.2. Added a script at /etc/rc.d/init.d/postgresql to start the database at boot but it doesn't work. The script: su postgres /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -o "-i" start The start command works, but as you already know, the su postgres must go someplace else. When I comment it out the command line '/etc/rc.d/init.d/postgresql' as user postgres starts the database. Believe that a script to stop the database is also required. Thanks for your help. Bill __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/