Subject: postgres and Tcl/Tk

From: Anne POSSOZ <[email-masked]>
Date: Fri, 02 Sep 1994 15:54:45 +0200

I am new in the field of postgres/ingres, but I have the
following question.

After having installed successfully postgres on my Sun Sparc
running Solaris 2.3, I am trying to figure out the best
way to use Tcl/Tk as a front-end to Postgres.

Is tclsql what I need? Are they other utilities? Has anybody
have expertize and/or comments.

Thanks to all.

                    Anne Possoz
                    Service Informatique Central
                    Ecole Polytechnique Federale de Lausanne
                    1015 Lausanne (Switzerland)
                    E-Mail : [email-masked]
                    Tel : (41/21) 693.22.49
                    Fax : (41/21) 693.22.20

==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "[email-masked]"

   If this fails, send mail to "[email-masked]" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================

---

From: [email-masked] (Paul M. Aoki)
Date: Fri, 02 Sep 94 10:19:48 -0700

> way to use Tcl/Tk as a front-end to Postgres.

get the pgbrowse package from crseo.ucsb.edu, it includes
a Tcl/TK binding for postgres.  the README is at the bottom 
of this message.

> Is tclsql what I need?

no; postgres doesn't use SQL and definitely doesn't come from 
CA-Ingres.

PGBROWSE
--------

PGBrowse is a Postgres Browser built with Tcl/Tk.

Installation
------------

PGBrowse runs under an extended version of the Tk interpreter called
"wishpqx".  Wishpqx includes all of the functionality of the normal
Tcl/Tk wish along with Extended Tcl (TclX) and libpq.  The core of
pgbrowse includes all of the run-time support you need to run wishpqx -
you do not need to install Tcl/Tk to use pgbrowse unless you plan to
re-compile wishpqx.  The core of pgbrowse, source and pre-compiled
version of wishpqx are available in the pub/pgbrowse anonymous ftp
directory of crseo.ucsb.edu:

 Filename			Description
 --------			-----------
 pgbrowse-v3.1b.tar.Z		core Tcl scripts and wishpqx source(*)
 pgbrowse-v3.1b.mips.tar.Z	pre-compiled wishpqx for Dec MIPS Ultrix		
 pgbrowse-v3.1b.alpha.tar.Z	pre-compiled wishpqx for Dec Alpha OSF
 pgbrowse-v3.1b.risc.tar.Z	pre-compiled wishpqx for IBM RS6000
 pgbrowse-v3.1b.sun4.tar.Z	pre-compiled wishpqx for Sun Sparcstation
 pgbrowse-v3.1b.patch		a patch for the "copy" dialog in pgbrowse
 pgbrowse-v3.1b.patch2		a patch for the Query Class dialog
 pgbrowse-v3.1b.libpqcmds-patch
				a patch for libpqcmds which you need only
				if you plan to recompile wishpqx

 * If you want to re-compiled wishpqx, you'll need to install
   Tcl, Tk, Extended Tcl and Postgres with libpq

Installation:
------------

1.  Get pgbrowse-v3.1b.tar.Z and any needed pre-compiled wishpqx files.
2.  Decide on a new directory for installation, call it $PGB.
3.  Extract the core:

	% mkdir $PGB
	% cd $PGB
	% zcat pgbrowse-v3.1b.tar.Z | tar xvf -

4.  Extract the wishpqx binaries you need:

	% cd $PGB
	% zcat pgbrowse-v3.1b.mips.tar.Z | tar xvf -
	% zcat pgbrowse-v3.1b.alpha.tar.Z | tar xvf -
	...

    or, if you need to compile wishpqx, do the right thing to
    $PGB/src/Makefile and edit the $PGB/bin/pgbrowse script.  You'll
    need tcl, tk, tclx, and postgres already installed and will want
	to install the libpqcmds patch before compiling with:

		% cd $PGB/src
		% patch < pgbrowse-v3.1b.libpqcmds-patch

5.  You may want to do something sensible with $PGB/man/man1/pgbrowse.1
    and perhaps link $PGB/bin/pgbrowse to someplace nice.

6.  Apply the pgbrowse-v3.1b.patch patch:

	% cd $PGB
	% patch < pgbrowse-v3.1b.patch patch

7.  You're done!

Running:
-------

Be sure to define the envrionment variable PGBROWSE to point to the
installation directory (called $PGB above) before starting pgbrowse,
for example:

	% setenv PGBROWSE /usr/local/pkg/pgbrowse (csh)
	% PGBROWSE=/usr/local/pkg/pgbrowse; export PGBROWSE (sh)
	% $PGROWSE/bin/pgbrowse

Ideas?  Comments?  Bugs?
------------------------

Contact:

  Jim Davidson                     |  [email-masked]
  CSL / Center for Remote Sensing  |  [email-masked]
  University of California         |  Phone (805)893-8475
  Santa Barbara, CA 93106          |  Fax           -2578

last modified:  Tue Jul  5 17:39:15 PDT 1994
--
  Paul M. Aoki          |  University of California at Berkeley
  [email-masked]  |  Dept. of EECS, Computer Science Division (#1776) 
                        |  Berkeley, CA 94720-1776