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