index.html100644 0 0 2253 6742546104 11144 0ustar rootroot PgAccess - a Tcl/Tk interface for PostgreSQL

PgAccess - a Tcl/Tk interface for PostgreSQL


intro.html100644 0 0 4462 6742545443 11201 0ustar rootrootPgAccess - Introduction

PgAccess - Introduction

What is PgAccess?

PgAccess is a graphical user interface for the PostgreSQL database management system written in the Tcl/Tk scripting language by Constantin Teodorescu. It allows the user to interact with PostgreSQL in a manner similar to many PC database applications, with menu choices and graphical tools like buttons. This means that the user can avoid the basic command line interface for most common tasks. PgAccess doesn't change the way PostgreSQL operates, just makes it easier to use for those familiar with graphical interfaces.

Obviously, you must have PostgreSQL installed and running, and Tcl/Tk on your system before you can use PgAccess.

PgAccess is an "open source" application. The source code is available to the user, and may be modified by the user. The user can fix a bug, or change the way a function operates. You may not want to get that involved with the programming, but you have the option to do so. If you feel you have made an improvement to the program, you are encouraged to share it with other users.

If you are not familiar with how open source software can be altered and redistributed, please read this.

How to get help with PgAccess

The mailing list for PgAccess is: pgsql-interfaces@postgresql.org

If you have any questions regarding PgAccess you should subscribe to this list in the following way:

First subscribe to the list by sending an email message to:

pgsql-interfaces-request@postgresql.org

Send a single line in the body of the message as follows:

subscribe

In a short time you should receive a message beginning like this:

Welcome to the pgsql-interfaces mailing list!
...

This will contain instructions on how to remove yourself from the mailing list, so save that message. You may only want to ask a few questions and then stop receiving messages.

You may also email Constantin Teodorescu directly, although writing to a mailing list with many correspondents will often produce a quicker answer.

Back to index irix.html100644 764 764 10532 6742546065 11425 0ustar sarahsarah PgAccess on Irix

INSTALLING PgAccess UNDER IRIX 5.3.

This HOWO-TO make PgAccess working under Irix is written by Stuart Rison

These are the steps that I had to follow to get pgaccess to run on an INDIGO2 running postgreSQL 6.3.2 under IRIX 5.3. I make no guarantee whatsoever that the same step will work for others but at least it should point you in the right direction. Also, I am a biologist by training so I only got pgaccess working by fudging (that is, trial and error) this means that some of the steps may be unnecessary (e.g. compiling $postgreSQL_source/src/interfaces/libpgtcl as both a shared and static library) and they certainly haven't been optimised (I know nothing about compiler switches etc.).

1) Requirements:

2) Installation:

a) tcl/tk:

b) postgreSQL:

c) Compiling libpgtcl:

d) running pgaccess:

e) et voila!

3) Concluding remarks:

Good luck

Stuart Rison LICR University College London London W1P 8BT
stuart@ludwig.ucl.ac.uk

Back to index problems.html100644 0 0 6562 6742543165 11673 0ustar rootrootPgAccess - Common Problems

Common Problems with PgAccess

Connection failure

One of the most common initial problems is the message:

Error connecting database
Connection to database failed
connectDB() failed: Is the
postmaster running and
accepting TCP/IP (with -i)
connections at 'localhost' on
port '5432'?

This usually occurs because the "postmaster" (the postgreSQL backend) was not started with the -i option. Usually just adding -i to the command line that starts the postmaster and restarting will fix this.

libpgtcl not found

PgAccess requires a library of functions named libpgtcl. This should be available with the postgreSQL distribution, and is usually placed in the correct location when installing postgreSQL. First check that there is a file named libpgtcl.so (perhaps with a number appended - or libpgtcl.dll on Windows systems) on your system. If not, you will have to download and perhaps compile this library.

ftp://ftp.flex.ro/pub/pgaccess

is one place that you can download precompiled libpgtcl libraries for PgAccess.

Locale specific characters

This problem occurs with some special characters used in different countries because PgAccess did not use fonts with `-ISO8859-1' encoding.

One solution was proposed by H.P.Heidinger ( hph@hphbbs.ruhr.de) and is very simple.

If you look in the file pgaccess.tcl, you will find the fonts declared in this manner:

$ grep -e '-font' -i pgaccess.tcl
-font -Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-* \
...

The font declarations should be altered to:

-font -Adobe-Helvetica-Medium-R-Normal-*-*-120-*-*-*-*-iso8859-1
...

That is, inserting an asterisk between the first pair of hyphens, and changing the final two asterisks to iso8859 and 1 respectively.

You can alter the source code by running the following script :

#!/bin/sh
cp pgaccess.tcl pgaccess.tcl-org
cat pgaccess.tcl |\
sed -e's/\-\*\-\*\ /\-iso8859\-1\ /g' |\
sed -e's/\-\*\-\*\}/\-iso8859\-1}/g' |\
sed -e's/\-\*\-\*\]/\-iso8859\-1]/g' |\
sed -e's/\-\*\-\*$/\-iso8859\-1/g' |\
sed -e's/\-Clean\-/\-Fixed\-/g' |\
sed -e's/clean/fixed/g' >pgaccess.iso
mv pgaccess.iso pgaccess.tcl
chmod +x pgaccess.tcl

The final version of PgAccess (1.0) will let the user decide what fonts will be used through a "preferences" dialog window.

a name="pg63">

Problem with PostgreSQL 6.3.x

PgAccess 0.93 and later may have problems working with PostgreSQL 6.3.x. Changes in libpgtcl have been made to remove these, but if you are using PostgreSQL 6.3.x, this patch will allow you to get around the problems.

In the procedure wpg_exec change the following line:

set pgsql(errmsg) [pg_result $pgsql(res) -error]

to this:

set pgsql(errmsg) "NO ERROR INFORMATION SUPPLIED"

and the program will work. The only disadvantage is that with some error conditions, you will not get the appropriate error message from libpgtcl.

Back to index start.html100644 0 0 7767 6742544612 11213 0ustar rootrootPgAccess - Getting Started

PgAccess - Getting Started

How to get PgAccess

If you have this HTML help system, you have probably already downloaded PgAccess. If not, or you wish to download the latest version, it is available from the URL:

http://www.flex.ro

The home page will contain instructions on which files to download for your operating system. Download the file to a directory where the program will eventually reside (see below).

How to uncompress PgAccess

PgAccess, like most applications available for download, is usually downloaded in compressed format to save download time. You must uncompress these files in order to use the application.

UNIX (Linux, BSD, IRIX, Solaris, etc.)

The files will be compressed using "gzip" and packaged using "tar", and have filenames like this:

pgaccess-n.nn.tar.gz

Note that "n.nn" will be the version number in an actual file.

First decide where you want to have the program. A typical location on UNIX systems is /usr/local/src/<name>, where <name> is the name of the program. To use this location, download or move the "tar.gz" file to the directory /usr/local/src. Change to that directory, and uncompress the file with the command:

tar -zxvf pgaccess-n.nn.tar.gz

You should see the files listed as they are uncompressed and placed in the new directory, and now have a directory named:

/usr/local/src/pgaccess

In that directory will be all of the files that were packaged in the downloaded file. When you have PgAccess working, you can delete the file with the ".tar" or ".tar.gz" extension.

Windows

The files will be compressed so that "WinZip" will uncompress the package. Just open the file with "WinZip" and the program files will be extracted.

Putting PgAccess where it will be found

UNIX

In order to run PgAccess easily, the program file "pgaccess.tcl" should be in a location on the "PATH" of the system. You can find out what the PATH is by entering:

echo $PATH
/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:./:/usr/local/pgsql/bin

Usually the directory /usr/local/bin will be in your PATH, and that is a fairly common place to put programs like PgAccess. Other common directories in the PATH are /usr/bin and /usr/sbin. Simply move the file "pgaccess.tcl" to the directory where you want it.

Windows

You will usually link PgAccess to an icon, so just specify the full path to the program when you create the icon.

Starting PgAccess

The easiest way to start PgAccess is to simply invoke the program by name:

pgaccess.tcl

If the program has been placed in a directory listed in the PATH, the PgAccess window should appear.

Starting from a menu

Most users will want to link the program to a menu or icon so that it can be started using the mouse or other pointing device. Here is a method that will work on most Linux X-Windows systems. Create a file named "pgaccess" in the directory /etc/X11/wmconfig with the following contents:

pgaccess name "PgAccess"
pgaccess description "postgreSQL frontend"
pgaccess mini-icon "mini-pgaccess.xpm"
pgaccess group "Applications"
pgaccess exec "pgaccess.tcl &"

This assumes that you have an "Applications" sub-menu. You may prefer "Programs" or some other place. Also, you will have to create the "mini-pgaccess.xpm" icon if you want it to appear. You can edit an existing icon from the /usr/share/icons/mini directory in XPaint and rename it. When you next start an X-Windows session, there should be a "PgAccess" item on the menu that you have chosen. Clicking on this item should start PgAccess.

Back to index