The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]

 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 pgaccess
Author: kurt 
Date:   28-10-01 19:33

(posted by Dan Langille)

Pgaccess (http://www.flex.ro/pgaccess) is a GUI for the PostgreSQL
database. It has the ability to create tables, queries, views, reports,
forms, schema and many other functions. However it does take a bit of configuring to get it working properly on FreeBSD... one of the joys of using FreeBSD as opposed to our more popular cousin ;).

The main problem is configuring Postgres to use the proper versions of wish,tcl,and tk (as FreeBSD uses multiple versions) and editing a few files.

The ports didn't work for me, so I downloaded the Postgres tarball from their website and untarred it in /usr/local. Changing to the
Postgresql-*.*.*/src/ directory, I configured it as follows:

./configure --with-odbc --with-tcl=/usr/local/include/tcl8.3
--with-tclconfig=/usr/local/lib/tcl8.3
--with-tkconfig=/usr/local/lib/tk8.3
--with-tclsh=/usr/local/bin/tclsh8.3

You can add the Perl interface and others as you prefer.

Then do a gmake install, as Postgres won't compile with regular make.

I then cd'd to /interfaces/libpgtcl to build libpgtcl and added this to
the Makefile:

CFLAGS += -I/usr/local/include/tcl8.3
CFLAGS += -I/usr/local/include/tk8.3

Then a gmake install to build it.


I then went into /usr/local/bin and edited the following lines in
pgaccess to read:

PATH_TO_WISH=/usr/local/bin/wish8.3
PGACCESS_HOME=/usr/local/postgresql-7.0.3/src/bin/pgaccess/

I then edited my home .profile to add the directory to my path:

/usr/local/pgsql/bin; export PATH

I kept getting libpgtcl errors when I tried to run pgaccess, so I added
the following to /etc/rc.conf as FreeBSD doesn't use ld.so.conf for
libraries:

ldconfig_paths="/usr/lib/compat /usr/X11R6/lib /usr/local/lib /usr/
/usr/local/postgresql-7.0.3/src/interfaces/libpgtcl/
/usr/local/pgsql/lib/"

You can also do this manually using the ldconfig command but I think
it's easier to put it in /etc/rc.conf so it's there permanently. I then
rebooted.

After doing your initdb and postmaster commands for Postgres to specify the directory for the databases, you can then call up Postgres with the following:

postmaster -i -D /path/to/your/databases

Then a command of:

pgaccess

should bring up the gui and get you started. Just add your database name after the pgaccess command if you want to start working in an existing database.

This is how I got it working, but any comments, suggestions or other
tips are welcome.


Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org