This is version 1.0.0 of Postgres Forms (pfm), a client application
for PostgreSQL.

Copyright (C) 2004 Willem Herremans

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

A copy of the  GNU General Public License is included in the 'doc'
subdirectory of this software package.

Please send bugs, fixes, suggestions, and improvements to

   pfm-comments@gborg.postgresql.org


Getting started:
---------------

To get Postgres Forms (pfm) running you need a running postgreSQL
database server and at least 1 database (which may be empty) that you
can access. See postgreSQL documentation for details.

Postgres Forms has been designed and tested with postgreSQL version
7.3.2, but it probably works with older and newer versions as
well. You can obtain postgreSQL from http://www.postgresql.org.

You also need 

   - either the Pgtcl package;

   - or the pgintcl package.

Both packages allows Tcl programs to communicate with the PostgreSQL
database server. You can obtain them from http://gborg.postgresql.org.

Notes:

    - If you intend to use pgintcl, the 'tcpip_socket' connection
      parameter has to be set 'true' in postgresql.conf. This can be a
      security risk. See postgreSQL documentation for details.

    - The Pgtcl package needs to be built, whereas the pgintcl package
      is just a Tcl script that you can copy to the pfm installation
      directory (PARENT/pfm).

    - If the pgin.tcl file is present in the installation directory,
      pfm sources it and does not attempt to load the Pgtcl package.

    - Postgres Forms has been designed and tested with version 1.4 of
      package Pgtcl and with version 1.5.0 of pgintcl.

Postgres Forms has been designed and tested with Tcl/Tk version
8.4. It also requires the package Iwidgets. You can obtain Tcl/Tk
from http://www.tcl.tk or from http://www.activestate.com.


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

You can either install pfm at system level, such that it is available
for all users, or at individual user level. The installation procedure
is the same, unless specified otherwise.

  1. For a system installation login as root.

  2. Put the pfm.tar.gz file in the directory in which you want to
     install the pfm directory and its subdirectories. This directory
     will henceforth be referred to as PARENT.  For a system
     installation PARENT could be /opt or /usr/local; for an
     individual user installation PARENT could be the user's home
     directory (~). Wherever 'PARENT' occurs in the following, replace
     it with the real name of that directory.

  3. cd to PARENT and unpack pfm.tar.gz:

     tar --extract --gunzip --verbose --no-same-owner --file=pfm.tar.gz

  4. This creates the directory PARENT/pfm which contains:

        - pfm.tcl, the tcl source-file/executable

        - install_pfm.sql, an SQL file which installs and populates
          the so called "pfm_* tables' that are necessary for using
          postgres forms in a data base. It is called by the menu
          Tools -> Install pfm-* tables.

        - install_sample.sql, an SQL file which fills the sample data
          base. Note that the sample data base must be first created
          before you run install_sample.sql.

        - doc, a subdirectory which contains the on-line help file,
          the image files it requires and a copy of the GNU General
          Public License.

  5. If you want to use the package pgintcl to communicate with
     postgreSQL, copy the pgin.tcl file to PARENT/pfm.

  6. Install a script file named 'pfm' in a directory that is in the
     PATH. For a system installation, that directory could be
     '/usr/bin/X11'; for an individual user installation that
     directory could be '~/bin'. The 'pfm' script file should contain
     the following lines:

         #!/bin/sh
         # Script that starts Postgres Forms (pfm)
         wish PARENT/pfm/pfm.tcl

     Note: - Don't forget to make this file executable with

                   chmod a+x pfm

           - A symbolic link to PARENT/pfm/pfm.tcl is not
             sufficient. It would allow you to start pfm, but pfm
             would not know its installation directory. The result
             would be that the on-line help and the install_pfm tables
             would not work.

  7. This completes the installation. If it was an installation at
     system level, all users (after logging out and in) can start pfm
     by typing pfm on the command line. If it was an installation at
     user level, only the user who installed it can start pfm.

  8. Open the database on which you want to use pfm.

  9. Install the pfm_* tables with Tools -> Install pfm_* tables.

 10. You are ready to use pfm. More documentation is found in the
     on-line help-file.

Note: The on-line help is the file 'help.html' in the PARENT/pfm/doc
      directory. It can also be viewed by a web browser.
