---
XPG
---

xpg is a graphical user interface for Postgres, the DBMS from Berkeley
University.  xpg is based on X11 and Motif.



REQUIREMENTS

In order to build xpg, you need the Motif toolkit, and an installed
version of Postgres.  xpg has been tested with Motif versions 1.1
and 1.2, and with Postgres versions 4.0.1 and 4.1, and should compile
on systems with any combination of these versions without version-
specific configuration.
You will probably have to use a non-ANSI C compiler.



BUILDING AND INSTALLING XPG

If you have xmkmf on your system, follow these steps:
- edit the Imakefile which comes with xpg.
  You only need to edit the following variables:
  PGDIR
	the directory of the installed Postgres package.
  PERMISSIONS_FILE
	the full pathname of the xpg permissions file, which comes
	with the xpg package under the name "xpg.permission-rules".
	You can also edit this file (after reading the comments)
	and add permission rules if needed, but this can wait until
	xpg is running.
	Note that xpg will not run if it cannot locate or read the
	permissions file.
  ONLINE_HELP_DIR
	the directory in which xpg searches for its on-line help
	files.  You should use an absolute directory name (starting
	with '/') so this directory can be found from anywhere in the
	directory tree.

- execute "xmkmf"
- execute "make World"

If you do not have xmkmf on you system, you will have to use the 
Makefile which comes with xpg, which is named Makefile.std . You
will have to edit it to reflect your system configuration and
change the above variables.  After you do this you can execute
"make World" to build xpg.

After xpg is built, you can install it.  xpg does not install its
files automatically; you will have to:
- copy the permissions file "xpg.permission-rules" to the location
  specified in the PERMISSIONS_FILE variable;
- copy all the files in the Help subdirectory to the directory
  specified in the ONLINE_HELP_DIR variable;
- copy the xpg executable to anywhere you like.

That's it, xpg should be ready to run.
Remember that the default permissions file allows users to access
their own databases only, and you might want to change this by
editing the permissions file. You do not have to rebuild xpg
to apply the changes.



ENVIRONMENT VARIABLES

xpg uses several environment variables for starting communication
with the Postgres backend.
  PGHOST
	the host on which the Postgres server is running
  PGPORT
	port to use for connecting to the server
  POSTGRESHOME
	the directory of the Postgres package. This variable was
	replaced in Postgres 4.1 by the PGDATA variable, which
	points to the directory of the Postgres database.

These variables must be set to the correct values before xpg
in run, otherwise xpg will exit as soon as it tries to establish
communication with the Postgres server.



RESOURCE EDITING

The xpg widget tree is described in the file "xpg.tree". It was
created using the editres utility, which you can use too for
browsing xpg's widget tree. 
You can use any of the Motif resources defined for the widgets,
to control the visual appearance of the various windows and
controls.  In addition, xpg supports application-specific and
class-specific resources; read the XPG RESOURCES section from
within xpg's on-line help, or read the file "Help/resources.olh".



TESTED PLATFORMS

xpg was tested on a sparc station running SunOS 4.1.2 and 4.1.3
with Motif version 1.1, and on Solbourne Series 5 computers
running OS/MP 4.1A.1 with Motif 1.2 .
xpg was not tested on a DECstation, although an Ultrix version
of Postgres is supported by the Postgres project, for the simple
reason that we do not have such a beast running Motif.  I guess
that small modifications should be made to make xpg run on this
machine (for example, I use vsprintf() which I don't think is
supported in Ultrix), but these should be minor.
Please send me any patches (using "diff -c") if you have modified
xpg to work with any other hardware/software.



HELP!

xpg does not come with a manual page, because all there is to know
is is found in the on-line help texts and in the file you are
currently reading.  If something is still unclear, please write
to the author so the on-line help can be updated for next
releases.



COPYRIGHT

Please read the COPYRIGHT file which comes with xpg.



DONATIONS
Donations are always welcome.  Please read the DONATIONS
section from within xpg's on-line help, or the file
"Help/donate.olh".



AUTHOR

xpg was designed and programmed by Ranen Goren, in the Institute
of Computer Science of the Hebrew University of Jerusalem, Israel.
The author can be reached at the email address  ranen@cs.huji.ac.il .
When you send any mail regarding xpg, please include the word "xpg"
(in lowercase) in the subject field, better as the only word in the
field (well, except for "Re:"). Please be patient while waiting
for my answers, because from September 1993 I will be able to
visit my account only once a week :(
