Commit dbdb80ba authored by Bruce Momjian's avatar Bruce Momjian

Remove 0.96 for update to 0.98

parent c60ecd8f
#-------------------------------------------------------------------------
#
# Makefile
# Makefile for pgaccess
#
# Copyright (c) 1994, Regents of the University of California
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/pgaccess/Attic/Makefile,v 1.2 1999/09/20 22:28:11 scrappy Exp $
#
#-------------------------------------------------------------------------
SRCDIR= ../..
include $(SRCDIR)/Makefile.global
.PHONY: all clean
all clean:
.PHONY: install
install: pgaccess.tcl
$(INSTALL) $(INSTL_EXE_OPTS) pgaccess.tcl $(BINDIR)/pgaccess
---------------------------------------------------------------------------
Copyright (c) 1994-7 Regents of the University of California
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose, without fee, and without a written agreement
is hereby granted, provided that the above copyright notice and this
paragraph and the following two paragraphs appear in all copies.
IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO
PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
---------------------------------------------------------------------------
PGACCESS 0.98 29 August 1999
================================
I dedicate this program to my little daughters Ana-Maria and Emilia and to my
wife for their understanding. I hope they will forgive me for spending so many
time far from them.
1. How to INSTALL ?
You will need a Tcl/Tk package, at least Tcl 7.6 and Tk 4.2, recommended
Tcl/Tk 8.x
For Unix users, unpack the pgaccess-xxx.tar.gz archieve in you preferred
directory (usually /usr/local).
Check where your "wish" program is and modify (if needed) the file
/usr/local/pgaccess/pgaccess and set variables PGACCESS_HOME and
PATH_TO_WISH to the appropriate directories.
Include the /usr/local/pgaccess directory into your PATH or make a
symbolic link to it wherever you want (in PATH directories).
Example:
$ ln -s /usr/local/pgaccess/pgaccess /usr/bin/pgaccess
You will find also some documentation and FAQ in the doc directory.
2. Usage
You run it with the command:
pgaccess [database]
[database] is optional.
3. Bug reporting
First of all : operating system, PostgreSQL version,Tcl/Tk version.
A more detailed story of what have you done when error occurred.
Tcl/Tk stops usually with a error message and there is a button there
"Stack Trace" and if you press it, you will see a detailed information
about the procedure containing the error. Please send it to me.
Some information about table structure, no. of fields, records would
be also good.
===========================================================================
You would find always the latest version at http://www.flex.ro/pgaccess
Please feel free to e-mail me with any suggestion or bug description
that will help to improve it.
Constantin Teodorescu <teo@flex.ro>
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="GENERATOR" CONTENT="Mozilla/4.03 [en] (X11; I; Linux 2.0.30 i586) [Netscape]">
<TITLE>PgAccess - Copyright notice</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<TT>---------------------------------------------------------------------------</TT>
<BR><TT></TT>&nbsp;
<BR><TT></TT>&nbsp;<TT></TT>
<P><TT>Copyright (c) 1994-7 Regents of the University of California</TT><TT></TT>
<P><TT>Permission to use, copy, modify, and distribute this software and
its</TT>
<BR><TT>documentation for any purpose, without fee, and without a written
agreement</TT>
<BR><TT>is hereby granted, provided that the above copyright notice and
this</TT>
<BR><TT>paragraph and the following two paragraphs appear in all copies.</TT><TT></TT>
<P><TT>IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY
PARTY FOR</TT>
<BR><TT>DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
INCLUDING</TT>
<BR><TT>LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS</TT>
<BR><TT>DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED
OF THE</TT>
<BR><TT>POSSIBILITY OF SUCH DAMAGE.</TT><TT></TT>
<P><TT>THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,</TT>
<BR><TT>INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY</TT>
<BR><TT>AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER
IS</TT>
<BR><TT>ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS
TO</TT>
<BR><TT>PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.</TT>
</BODY>
</HTML>
This diff is collapsed.
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.61 [en] (X11; I; Linux 2.2.11 i586) [Netscape]">
</head>
<body bgcolor="#FEFEDF">
<h2>
PgAccess developer API</h2>
<hr>
<br>Starting with PgAccess 0.98 I am planning to make available a complete
API for the PgAccess developers. I plan to make PgAccess not just an administrative
tool, but also a tool for easy build of small applications.
<p>That's why PgAccess 0.98 has been internally restructured, every main
module of PgAccess has became a namespace (see Tcl namespaces) in order&nbsp;
to hide the variables and internal procedures to the user. Also, all the
global variables that have been used before were grouped under a single
big associative array called <b>PgAcVar</b> (PgAccess variables) so they
should not interfere with user defined global variables.
<br>&nbsp;
<br>&nbsp;
<p><b><font size=+1>Global variables available</font></b>
<br>&nbsp;
<center><table BORDER=0 WIDTH="100%" NOSAVE >
<tr NOSAVE>
<td ALIGN=LEFT VALIGN=TOP NOSAVE><b>PgAcVar</b></td>
<td>The main global associative array that hold together various information
needed by PgAccess. User should <b><font color="#FF0000">NOT</font></b>
alter it under any circumstances.</td>
</tr>
<tr NOSAVE>
<td VALIGN=TOP NOSAVE><b>CurrentDB</b></td>
<td>The handler of the current opened database. Can be used for database
operations as selects or command execution.</td>
</tr>
<tr NOSAVE>
<td ALIGN=LEFT VALIGN=TOP NOSAVE><b>Messages</b></td>
<td NOSAVE>The associative array that holds the translation for the current
language. Loaded from the appropriate language file from lib/languages
directory</td>
</tr>
<tr NOSAVE>
<td ALIGN=LEFT VALIGN=TOP NOSAVE><b>PGACCESS_HOME</b></td>
<td>Keep the system directory of PgAccess root installation</td>
</tr>
</table></center>
<br>&nbsp;
<p><b><font size=+1>Window naming convention</font></b>
<p>Every toplevel window defined by PgAccess has the following naming convention.
Every window name starts with <tt>.pgaw</tt> (PgAccess window) followed
by a colon and a name. <i>Example:</i>
<blockquote><tt>.pgaw:User , .pgaw:About , .pgaw:ImportExport</tt></blockquote>
<b><font size=+1>Namespaces available</font></b>
<p>For every tab from the main database window there is a namespace defined
(Tables, Queries, Views, Functions, Sequences, Reports, Forms, Scripts,
Users, Schema). Every namespace has by default the following&nbsp; procedures:
<ul>
<li>
<tt>new</tt>&nbsp; , no parameter needed</li>
<li>
<tt>open</tt> , need a single parameter, the object name</li>
<li>
<tt>design</tt> , need a single parameter, the object name</li>
</ul>
You can use these procedures if you want to produce the same efects as
clicking on the desired tab and then on the "New", "Open" or "Design" buttons
from the main database window.
<br><i>Example:</i>
<blockquote><tt>Tables::open "customers"</tt>
<br><tt>Queries::open "Invoices received"</tt>
<br><tt>Forms::open "Add new invoice"</tt></blockquote>
The <tt>Tables::open</tt> procedure accepts two optional parameters, filter
and order.
<br><i>Example:</i>
<blockquote><tt>Tables::open "phonebook" "name ~* 'joe'" "age desc"</tt></blockquote>
will open a table view window with predefined filter "name ~* 'joe'" and
ordered by descending age.
<p>There is also a special namespace called Database.&nbsp; Here are some
procedures and functions defined for this namespace available to the user:
<br>&nbsp;
<table BORDER NOSAVE >
<tr BGCOLOR="#FFCCFF" NOSAVE>
<td NOSAVE><b>Name</b></td>
<td NOSAVE><b>Parameters</b></td>
<td><b>Type</b></td>
<td><b>Returns</b></td>
<td NOSAVE><b>Description</b></td>
</tr>
<tr>
<td><b>vacuum</b></td>
<td>none</td>
<td>procedure</td>
<td>nothing</td>
<td>vacuums the current database</td>
</tr>
<tr ALIGN=LEFT VALIGN=TOP NOSAVE>
<td><b>getTablesList</b></td>
<td>none</td>
<td>function</td>
<td>list</td>
<td NOSAVE>returns the list of tables from the current database</td>
</tr>
<tr ALIGN=LEFT VALIGN=TOP NOSAVE>
<td><b>executeUpdate</b></td>
<td>sqlcmd</td>
<td>function</td>
<td>integer</td>
<td NOSAVE>execute the sqlcmd command on the current database returning
1 if no errors ocurred or 0 if the command failed</td>
</tr>
</table>
<p><b><font size=+1>Global functions available</font></b>
<br>&nbsp;
<table BORDER NOSAVE >
<tr BGCOLOR="#99FFCC" NOSAVE>
<td><b>Name</b></td>
<td><b>Parameters</b></td>
<td NOSAVE><b>Description</b></td>
</tr>
<tr ALIGN=LEFT VALIGN=TOP NOSAVE>
<td><b>setCursor</b></td>
<td>type</td>
<td NOSAVE>Set the cursor for all PgAccess windows, type of cursor can
be WAIT or CLOCK or WATCH for the hourglass , anything else (or none) to
return to the normal cursor shape</td>
</tr>
<tr ALIGN=LEFT VALIGN=TOP NOSAVE>
<td><b>parameter</b></td>
<td>msg</td>
<td NOSAVE>Shows a modal input dialog with the msg message, wait for user
to enter the data and returns it as a string</td>
</tr>
<tr>
<td><b>showError</b></td>
<td>msg</td>
<td>Shows a modal dialog window with an error message</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</body>
</html>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.61 [en] (X11; I; Linux 2.2.11 i586) [Netscape]">
<base target="right">
</head>
<body bgcolor="#00FFFF">
<img SRC="ball.gif" ><a href="main.html">What is PgAccess?</a>
<br><img SRC="ball.gif" ><a href="whatsnew.html">What's new?</a>
<br><img SRC="ball.gif" ><a href="features.html">Features</a>
<br><img SRC="ball.gif" ><a href="screenshots.html">Screenshots</a>
<br><img SRC="ball.gif" ><a href="faq.html">FAQ</a>
<br><img SRC="ball.gif" ><a href="documentation.html">Documentation</a>
<br><img SRC="ball.gif" ><a href="todo.html">To-Do list</a>
<br><img SRC="ball.gif" ><a href="download.html">Download</a>
<br>&nbsp;
<p><br>
<center>
<p><a href="http://www.linux.org"><img SRC="linux1.gif" BORDER=0 ></a></center>
<p><b>Other links</b>
<br><img SRC="ball.gif" ><a href="http://www.postgresql.org">PostgreSQL</a>
<br><img SRC="ball.gif" ><a href="http://www.neuron.com/stewart/vtcl/index.html">Visual Tcl</a>
<br><img SRC="ball.gif" ><a href="http://www.scriptics.com">Tcl/Tk</a>
<br><img SRC="ball.gif" ><a href="http://www.linux.org">Linux</a>
<br><img SRC="ball.gif" ><a href="http://www.java.ro/vtclava/index.html">vTcLava</a>
</body>
</html>
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="GENERATOR" CONTENT="Mozilla/4.03 [en] (X11; I; Linux 2.0.30 i586) [Netscape]">
<TITLE>PgAccess - Copyright notice</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<TT>---------------------------------------------------------------------------</TT>
<BR><TT></TT>&nbsp;
<BR><TT></TT>&nbsp;<TT></TT>
<P><TT>Copyright (c) 1994-7 Regents of the University of California</TT><TT></TT>
<P><TT>Permission to use, copy, modify, and distribute this software and
its</TT>
<BR><TT>documentation for any purpose, without fee, and without a written
agreement</TT>
<BR><TT>is hereby granted, provided that the above copyright notice and
this</TT>
<BR><TT>paragraph and the following two paragraphs appear in all copies.</TT><TT></TT>
<P><TT>IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY
PARTY FOR</TT>
<BR><TT>DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
INCLUDING</TT>
<BR><TT>LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS</TT>
<BR><TT>DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED
OF THE</TT>
<BR><TT>POSSIBILITY OF SUCH DAMAGE.</TT><TT></TT>
<P><TT>THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,</TT>
<BR><TT>INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY</TT>
<BR><TT>AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER
IS</TT>
<BR><TT>ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS
TO</TT>
<BR><TT>PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.</TT>
</BODY>
</HTML>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.61 [en] (X11; I; Linux 2.2.11 i586) [Netscape]">
</head>
<body bgcolor="#FEFEDF">
<h2>
Documentation</h2>
<hr WIDTH="100%">
<p>Still need to be written. Some information can be found in the help
included in the main program.
<p>Jim Lemon &lt;Jim.Lemon@uts.EDU.AU> has started writing a <a href="tutorial/index.html">tutorial</a>.
Thought it is based on earlier versions than 0.98 it is a beginning after
all, isn't it ?
</body>
</html>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.61 [en] (X11; I; Linux 2.2.11 i586) [Netscape]">
</head>
<body bgcolor="#FEFEDF">
<h2>
Download</h2>
<hr>
<br>The primary site for PgAccess downloads is:
<ul><a href="ftp://ftp.flex.ro/pub/pgaccess">ftp://ftp.flex.ro/pub/pgaccess</a>
<ul>
<li>
<a href="ftp://ftp.flex.ro/pub/pgaccess/pgaccess-0.98.tar.gz">Unix tar.gz
file</a></li>
<li>
<a href="ftp://ftp.flex.ro/pub/pgaccess/pgaccess-0.98.zip">Windows .zip
file</a></li>
</ul>
</ul>
<p>Another one (just with a little bit faster, try this one first) would
be :
<ul><a href="ftp://speedy.flex.ro/pub/pgaccess">ftp://speedy.flex.ro/pub/pgaccess</a>
<ul>
<li>
<a href="ftp://speedy.flex.ro/pub/pgaccess/pgaccess-0.98.tar.gz">Unix tar.gz
file</a></li>
<li>
<a href="ftp://speedy.flex.ro/pub/pgaccess/pgaccess-0.98.zip">Windows .zip
file</a></li>
</ul>
</ul>
<br>&nbsp;
</body>
</html>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.61 [en] (X11; I; Linux 2.2.12 i586) [Netscape]">
</head>
<body bgcolor="#FEFEDF">
<h2>
PgAccess - FAQ</h2>
<hr>
<br><b>1. When I run PgAccess I got a message complaining about the crypt
library! What should I do?</b>
<blockquote>Versions of PostgreSQL prior to 6.5.1 couldn't reliably detect
the presence of the crypt library on RedHat 5.x systems. That's why the
libpgtcl library does not include reference to crypt. You will need to
get a proper copy of libpgtcl.so library or to compile one. Go to the postgresql
source directory into src/interfaces/libpgtcl and edit Makefile adding
-lcrypt to the end of the line SHLIB_LINKS. Make clean and make again.
Your libpgtcl.so is now prepare to run PgAccess. I strongly recommend you
to upgrade to PostgreSQL 6.5.1 where this problem has been solved.</blockquote>
<b>2. I cannot connect to a database from another machine</b>
<blockquote>There may be two problems here. First of all, PgAccess running
on the localhost is using two PostgreSQL dependent libraries, libpq and
libpgtcl. Each of them are compiled for a specific PostgreSQL version.
If the PostgreSQL version running on your server is different you might
experience problems. The other problem is related to access rights. On
the PostgreSQL server, in data directory there is a file pg_hba.conf that
will grant access rights to users based on host authentication. Ask your
database administrator to check if your workstation is listed there with
the appropriate access rights. Try for the beginning the 'trust' mode,
allowing full access to the databases.</blockquote>
<b>3. I am experiencing core dumps when trying to run PgAccess. Is PgAccess
broken?</b>
<blockquote>No. There were NEVER reported crashes because of PgAccess.
All of them were related to bad libraries usage. The most frequent was
the installing of a new PostgreSQL on a RedHat 5.x server where the postgresql-clients
rpm still exists. So, PgAccess was trying to use the old libpgtcl.so library
suitable for an older version of PostgreSQL. Before installing a new PostgreSQL
(either by compiling it ot by rpm packages) remove ANY TRACE of old PostgreSQL.
PgAccess is fully relying on libpgtcl library in order to get access to
the database so when you are experiencing that kind of problems, double-check
libpq and libpgtcl libraries.</blockquote>
<b>4. When I try to run PgAccess I get the following error : Application
initialization failed: couldn't connect to display ""</b>
<blockquote>That kind of error was reported on some Linux RedHat 5.x systems
when user has su - to root and tried to run PgAccess. Some unknown errors
in login scripts are not defining the DISPLAY environment and the wish
application cannot connect to the X display. Try typing <tt>export DISPLAY=localhost:0.0</tt>
and run PgAccess again.</blockquote>
<b>5. Cannot run PgAccess on a Windows machine.</b>
<blockquote>In order to use PgAccess on Windows you must have installed
two libraries libpq.dll and libpgtcl.dll suitable for your Tcl/Tk package
and your PostgreSQL server. Note that libraries that work with Tcl/Tk 8.0.x
won't work with Tcl/Tk 8.1.x and libraries that work with 6.4.2 backend
won't work with 6.5.x. So, you must properly identify your Tcl/Tk package
version and your PostgreSQL version and download from the Downloads section
(or pick from the win32/dll directory of PgAccess distribution) the right
files. Copy them into your Windows/System directory and try again. Also,
you should be able to access over the network the machine running the PostgreSQL
server (try ping-ing it) and have the proper access rights to the database.</blockquote>
<b>6. How much costs PgAccess?</b>
<blockquote>PgAccess is a free tool. You won't have to pay anything in
order to use it. It is protected by the following <a href="copyright.html">copyright</a>
as PostgreSQL is. I cannot guarantee technical support but I will try to
answer to your questions as much as I can.</blockquote>
<b>7. I want to translate PgAccess messages for xxx language. What should
I do?</b>
<blockquote>In the PgAccess distribution in lib/languages directory there
are files with messages translated for different languages. Copy one of
them and name it after your native language and then start editing it translating
all the messages. Save it into the same directory and that's all. Don't
forget to send me a copy in order to include it into the standard distribution.</blockquote>
<p><br><b>8. I am receiving the following error: <tt>message invalid command
name "namespace" while executing "namespace eval Mainlib</tt>&nbsp; ..."</b>
<blockquote>That means 100% that you have an older version of Tcl/Tk that
don't recognize namespaces command. Please upgrade to Tcl/Tk 8.0.x minimum</blockquote>
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
</body>
</html>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.61 [en] (X11; I; Linux 2.2.11 i586) [Netscape]">
</head>
<body bgcolor="#FEFEDF">
<b>Tables</b>
<br>- opening multiple tables for viewing, max. n records (changed by preferences
menu)
<br>- column resizing, dragging the vertical grid line (better in table
space rather than in the table header)
<br>- text wrap in cells - layout saved for every table
<br>- import/export to external files (SDF,CSV)
<br>- filter capabilities (enter filter like (price>3.14)
<br>- sort order capabilities (enter manually the sort field(s))
<br>- editing in place
<br>- improved table generator assistant
<br>- improved field editing
<br><b>Queries</b>
<br>- define , edit and stores "user defined queries"
<br>- store queries as views
<br>- execution of queries with optional user input parameters ( select
* from invoices where year=[parameter "Year of selection"] )
<br>- viewing of select type queries result
<br>- query deleting and renaming
<br>- visual query builder with drag &amp; drop capabilities. For any of
you who had installed the Tcl/Tk plugin for Netscape Navigator, you can
see it at work <a href="qbtclet.html">clicking here</a>
<br><b>Sequences</b>
<br>- defines sequences, delete them and inspect them
<br><b>Functions</b>
<br>- define, inspect and delete functions in SQL, plpgsql and pgtcl languages
<br><b>Reports</b>
<br>- design and display simple reports from tables
<br>- fields and labels, font changing, style and size
<br>- saves and loads report description from database
<br>- show report previews, sample postscript output file
<br><b>Forms</b>
<br>- open user defined forms
<br>- form design module available
<br>- query widget available, controls bound to query results
<br>- <a href="forms.html">click here</a> for a description of forms and
how they can be used
<br><b>Scripts</b>
<br>- define, modify and call user defined scripts
<br><b>Users</b>
<br>- define and modify user information
<p><b><a href="api.html">PgAccess API</a></b> for developing small applications
<br>&nbsp;
</body>
</html>
This diff is collapsed.
This diff is collapsed.
<HTML>
<HEAD>
<TITLE>PgAccess</TITLE>
<FRAMESET COLS="200,*" border=0 framespacing=0 frameborder=no>
<FRAME NAME="left" scrolling="none" src="contents.html">
<FRAME NAME="right" scrolling="nonw" src="main.html">
</FRAMESET>
</HTML>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>PgAccess on Irix</TITLE>
<META NAME="GENERATOR" CONTENT="Mozilla/3.04Gold (X11; I; Linux 2.0.33 i586) [Netscape]">
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EF" VLINK="#51188E" ALINK="#FF0000">
<H1>INSTALLING PgAccess UNDER IRIX 5.3.
<HR WIDTH="100%"></H1>
<P><B><FONT COLOR="#000080">This HOWO-TO make PgAccess working under Irix
is written by Stuart Rison</FONT></B></P>
<P>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.).</P>
<P><B>1) Requirements:</B></P>
<UL>
<P>You will need:</P>
<UL>
<LI>postgreSQL source (http://www.postgresql.org)</LI>
<LI>tcl8.0 source (http://www.tclconsortium.org/)</LI>
<LI>tk8.0 source (http://www.tclconsortium.org/)</LI>
<LI>pgaccess source (http://www.flex.ro/pgaccess)</LI>
</UL>
</UL>
<P><B>2) Installation:</B></P>
<P>a) tcl/tk:</P>
<UL>
<P>You must first install tcl and then tk (in that order). I just used
./configure, no switches and gmake. Their installation should be trouble
free. Then you must move headers and libraries to the right places so:</P>
<P>Header files: both tcl and tk have a header file (tcl.h and tk.h). The
tcl.h file is in $tcl_source_dir/generic and the tk.h file is in $tk_source_dir/generic;
both should be copied to /usr/local/include.</P>
<P>Libraries: compilation (with cc) of tcl and tk yield libraries libtcl8.0.a
and libtk8.0.a in $source_dir/unix. Both should be copied to /usr/local/lib.</P>
</UL>
<P>b) postgreSQL:</P>
<UL>
<P>Make sure you have a fully patched postgreSQL source. If your ./configure
says it can't load 'IRIX' settings then you most probably will need to
patch ./configure.</P>
<P>Configure using ./configure with the following switches: ./configure
--with-includes=/usr/local/include</P>
<P>--with-libraries=/usr/local/lib --with-tcl [this and previous line as
one]</P>
<P>Then make, make install as usual</P>
</UL>
<P>c) Compiling libpgtcl:</P>
<UL>
<P>The source for libpgtcl is in $postgreSQL_directory/src/interfaces/libpgsql.</P>
<P>I do this twice. Once with just gmake. This produces a static library
libpgtcl.a which I leave where it is (I don't know what to do with it but
it may just come in handy). The I modify Makefile manually with a text
editor. Essentially I modify two line:</P>
<P>before:</P>
<P># Shared library stuff</P>
<P>install-shlib-dep := shlib :=</P>
<P>after:</P>
<P># Shared library stuff</P>
<P>install-shlib-dep := install-shlib shlib := libpgtcl.so.1</P>
<P>Then gmake -f Makefile_modified. This creates two shared (.so) libraries:
libpgtcl.so and libpgtcl.so.1. I can't tell the difference between them
so I copied them both to /usr/lib/.</P>
</UL>
<P>d) running pgaccess:</P>
<UL>
<P>Uncompress pgaccess (usually with gunzip and tar). So long as 'wish'
(a binary produced when compiling tk8.0) is somewhere in your path, you
should be able to run pgaccess with:</P>
<P>wish -f $pgaccess_dir/pgaccess.tcl [postgreSQL_database_name]</P>
</UL>
<P>e) et voila!</P>
<P><B>3) Concluding remarks:</B></P>
<UL>
<P>As I stated at the start of this document, following the procedure indicated
above worked for me. I am sure, however, that a few of the steps are unnecessary/non-optimised/stupid
etc. If any Unix (IRIX) boffin is reading this and you spot anything you
would like to comment/correct etc. please e-mail me (stuart@ludwig.ucl.ac.uk).
Also, if you just have questions and think I might help, please contact
me at the same e-mail.</P>
<P>Finally, I can accept no responsibility if these steps don't work for
you or if it all goes horribly wrong and you 'damage' your computer trying
them. Let common sense prevail!</P>
</UL>
<P>Good luck</P>
<P>Stuart Rison LICR University College London London W1P 8BT<BR>
<A HREF="mailto:stuart@ludwig.ucl.ac.uk">stuart@ludwig.ucl.ac.uk</A></P>
</BODY>
</HTML>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE></TITLE>
<META NAME="GENERATOR" CONTENT="Mozilla/3.04Gold (X11; I; Linux 2.0.32 i586) [Netscape]">
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EF" VLINK="#51188E" ALINK="#FF0000">
<P>The mailing list for PgAccess is : &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B><TT>pgsql-interfaces@postgresql.org</TT></B></P>
<P>If you have some questions regarding PgAccess you should mail to this
address. I will also answer to messages addresed directly to me but it
would be better to post your messages here because it might be possible
to get an answer quickly from another user of PgAccess.</P>
<P>
<HR WIDTH="100%"></P>
<P>To subscribe please send a mail message to&nbsp;:</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B><TT><FONT SIZE=+1>pgsql-interfaces-request@postgresql.org
</FONT></TT></B>&nbsp;</P>
<P>having a single line in the body message :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B><TT><FONT SIZE=+1>subscribe</FONT></TT></B></P>
<P>In a couple of minutes , if everything is ok, you must receive something
like that :</P>
<P>
<HR WIDTH="100%"></P>
<P><TT>Welcome to the pgsql-interfaces mailing list!</TT></P>
<P><TT>Please save this message for future reference. Thank you.</TT></P>
<P><TT>If you ever want to remove yourself from this mailing list, you
can send mail to &lt;Majordomo@hub.org&gt; with the following command in
the body of your email message:</TT></P>
<P><TT>unsubscribe pgsql-interfaces yourname@yourdomain</TT></P>
<TT></TT>
</BODY>
</HTML>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.61 [en] (X11; I; Linux 2.2.12 i586) [Netscape]">
</head>
<body bgcolor="#FEFEDF">
<h1>
PgAccess
<hr WIDTH="100%"></h1>
A free graphical database management tool for <a href="http://www.postgresql.org">PostgreSQL</a>.
PgAccess has been written by <a href="mailto:teo@flex.ro">Constantin Teodorescu</a>
using Visual Tcl, the best tool for developing Tcl/Tk applications I've
ever seen.
<p><b>Last version</b>
<br>Last stable version is 0.98 , released on 29 August 1999. Read <a href="whatsnew.html">what's
new</a> in 0.98.
<p><b>Portability issues</b>
<br>PgAccess is available for every platform where PostgreSQL was ported
and where a Tcl/Tk package is available. PgAccess has been reported running
on :
<br>- Linux
<br>- FreeBSD
<br>- Solaris
<br>- HPUX
<br>- Irix
<br>- Windows 95,98,NT
<p>PgAccess needs Tcl/Tk versions 8.0.x and higher thought PgAccess. For
win32 platforms there are some special DLL's that have to be downloaded
and installed, more information <a href="win32.html">here</a>.
<p>PgAccess is protected by the following <a href="copyright.html">copyright</a>.
</body>
</html>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.61 [en] (X11; I; Linux 2.2.11 i586) [Netscape]">
<title>PgAccess - a Tcl/Tk PostgreSQL interface</title>
</head>
<body bgcolor="#FFFFFF">
<h1>
PgAccess - a free database management tool for <a href="http://www.postgreSQL.org">PostgreSQL</a></h1>
<hr>
<li>
Download the last version of PgAccess <a href="pgaccess-0.96.tar.gz">(press
shift and click this link) (tar.gz file)</a>&nbsp; or&nbsp;&nbsp; <a href="pgaccess.zip">this
one (zip file for Windows)</a></li>
<center>
<p><br>Latest stable version of PgAccess is 0.97 , released 16 August 1999
!
<p><font size=+2>PgAccess 0.93 and higher will not work from the beginning
with PostgreSQL 6.3.x !!</font>
<br><font size=+2>Read <a href="pg93patch.html">here</a> how to apply a
simple patch in order to make it work !</font></center>
<b><font color="#000000"><font size=+2></font></font></b>
<center><table BORDER=2 NOSAVE >
<tr NOSAVE>
<td NOSAVE><b><font color="#FF0000"><font size=+2>NEW</font></font></b></td>
<td NOSAVE><b><font color="#000000"><font size=+2>International version
(english, french, italian, romanian)</font></font></b></td>
</tr>
<tr NOSAVE>
<td NOSAVE><b><font color="#FF0000"><font size=+2>NEW</font></font></b></td>
<td><b><font size=+2>Context sensitive Help</font></b></td>
</tr>
</table></center>
<center>
<p>Precompiled libpgtcl and libpq binaries and dll's for i386 are <a href="ftp://ftp.flex.ro/pub/pgaccess">here
</a>!!!</center>
<h3>
<font color="#000080">Installation problems</font></h3>
<ul>
<li>
Some problems related with locale special characters could be solved by
this <a href="specialchars.html">simple patch</a></li>
<li>
I think that there were some problems loading libpgtcl library. I invite
you to read a <a href="index.html#libpgtcl">special section concerning
libpgtcl</a></li>
<li>
For Silicon Graphics Indigo computers, Irix operating system, there is
a <a href="irix.html">HOWTO make PgAccess to work</a></li>
</ul>
<h3>
<font color="#191970">What does PgAccess now!</font></h3>
Here are some screenshots from PgAccess windows : <a href="pic-pga-1.gif">Main
window </a>, <a href="pic-pga-2.gif">table builder </a>, <a href="pic-pga-4.gif">table(query)
view </a>, <a href="pic-pga-3.gif">visual query builder </a>.
<p><b>Tables</b>
<br>- opening multiple tables for viewing, max. n records (changed by preferences
menu)
<br>- column resizing, dragging the vertical grid line (better in table
space rather than in the table header)
<br>- text wrap in cells - layout saved for every table
<br>- import/export to external files (SDF,CSV)
<br>- filter capabilities (enter filter like (price>3.14)
<br>- sort order capabilities (enter manually the sort field(s))
<br>- editing in place
<br>- improved table generator assistant
<br>- improved field editing
<br><b>Queries</b>
<br>- define , edit and stores "user defined queries"
<br>- store queries as views
<br>- execution of queries with optional user input parameters ( select
* from invoices where year=[parameter "Year of selection"] )
<br>- viewing of select type queries result
<br>- query deleting and renaming
<br>- visual query builder with drag &amp; drop capabilities. For any of
you who had installed the Tcl/Tk plugin for Netscape Navigator, you can
see it at work <a href="qbtclet.html">clicking here</a>
<br><b>Sequences</b>
<br>- defines sequences, delete them and inspect them
<br><b>Functions</b>
<br>- define, inspect and delete functions in SQL, plpgsql and pgtcl languages
<br><b>Reports</b>
<br>- design and display simple reports from tables
<br>- fields and labels, font changing, style and size
<br>- saves and loads report description from database
<br>- show report previews, sample postscript output file
<br><b>Forms</b>
<br>- open user defined forms
<br>- form design module available
<br>- query widget available, controls bound to query results
<br>- <a href="forms.html">click here</a> for a description of forms and
how they can be used
<br><b>Scripts</b>
<br>- define, modify and call user defined scripts
<br><b>Users</b>
<br>- define and modify user information
<p>Here is <a href="pga-rad.html">a special section concerning forms and
scripts</a> .
<p>This program is protected by the following <a href="copyright.html">copyright</a>
<p>If you have any comment, suggestion for improvements, please feel free
to e-mail to : <a href="mailto:teo@flex.ro">teo@flex.ro</a>
<p><b><font color="#FF1493"><font size=+2>Mailing list for PgAccess </font></font></b><a href="maillist.html">Here
you will find how to subscribe to this mailing list</a>.
<p>
<hr>
<h1>
More information about libpgtcl - downloads</h1>
&nbsp;&nbsp;&nbsp;&nbsp; Also, you will need the PostgreSQL to Tcl interface
library, lined as a Tcl/Tk 'load'-able module. It is called libpgtcl and
the source is located in the PostgreSQL directory /src/interfaces/libpgtcl.
Specifically, you will need a libpgtcl library that is 'load'-able from
Tcl/Tk.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This is technically different from
an ordinary PostgreSQL loadable object file, because libpgtcl is a collection
of object files. Under Linux, this is called libpgtcl.so.
<p>&nbsp;&nbsp;&nbsp;&nbsp; One of the solutions is to remove from the
source the line containing <b>load libpgtcl.so </b>and to load pgaccess.tcl
not with wish, but with pgwish (or wishpg) that wish that was linked with
libpgtcl library! I do not recommend this one.
<p>&nbsp;&nbsp;&nbsp;&nbsp; If you have installed RedHat 5.x, you should
get the last distribution kit of PostgreSQL and compile it from scratch.
RedHat 5.x is using some new versions of libraries and you have to compile
and install again at least <b>libpq </b>and <b><tt>libpgtcl </tt></b>libraries.
<p>&nbsp;&nbsp;&nbsp; PostgreSQL 6.4 release has a minor bug. I does not
include by default the crypt lib when compiling libpgtcl. So, you will
need to manually add a -lcrypt to SHLIB line in Makefile in src/interfaces/libpgtcl
and then make clean and make again. The new libpgtcl.so library is properly
configured to run pgaccess.
<br>&nbsp;
</body>
</html>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.5 [en] (X11; I; Linux 2.0.36 i586) [Netscape]">
</head>
<body text="#000000" bgcolor="#FFFFFF" link="#0000FF" vlink="#FF0000" alink="#000088">
<h1>
PgAccess 0.93 patch to make it work with PostgreSQL 6.3.x
<hr WIDTH="100%"></h1>
<p><br>PgAccess 0.93 is working fine with PostgreSQL 6.4.x due to some
changes in libpgtcl !
<p>There is a small patch that you have to make in order to make it work
with 6.3.x !
<p>Replace in procedure <tt>wpg_exec</tt> the following line:
<p><tt>set pgsql(errmsg) [pg_result $pgsql(res) -error]</tt>
<p>with this one :
<p><tt>set pgsql(errmsg) "NO ERROR INFORMATION SUPPLIED"</tt>
<p>And it will work fine! In some error cases, you will not get the appropriate
error message from libpgtcl.
<p>&nbsp;<a href="index.html">Back</a>
</body>
</html>
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="GENERATOR" CONTENT="Mozilla/4.04 [en] (X11; I; Linux 2.0.32 i586) [Netscape]">
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EF" VLINK="#51188E" ALINK="#FF0000">
<H1>
PgAccess - Scripts and Forms&nbsp;
<HR WIDTH="100%"></H1>
Beginning with 0.70 version, I have introduced in PgAccess two new modules
for operating with scripts and forms.
<P>&nbsp;&nbsp; This would give to PgAccess the power of creating application
directly into PgAccess, defining new modules, procedures, forms and possibly
making it a rapid development tool for PostgreSQL. The "scripts" and "forms"
modules are using two new tables called pga_forms and pga_scripts. PgAccess
take care of creating them if user is opening a new database and grant
ALL permissions on them to PUBLIC.
<BR>&nbsp;
<BR>&nbsp;&nbsp; Of course, when Designing a script, a simple text editor
is opened and text is saved as is in pga_scripts table. When "designing"
a form, a "form editor" that would be very similar with "Visual Tcl" is
invoked.
<P>&nbsp;&nbsp; This mechanism and the extremely versatile scripting mode
of Tcl/Tk would give PgAccess a great power for creating end user application
using PostgreSQL. The most important thing is that the user could call
procedures and functions that I have used for building up PgAccess !
<H3>
Forms</H3>
&nbsp;&nbsp; Forms are used for creating windows and placing widgets inside
it. When PgAccess interpret them, a new window appear, with buttons as
defined that could call "user defined scripts", "user defined procedures"
or "internal PgAccess procedures".
<BR>&nbsp;&nbsp; Forms can hold all the widgets allowed in Tcl/Tk , buttons,
check-boxes, radio-buttons, list-boxes, frames, canvases, etc. With these
forms, you can control your application so PgAccess would become just a
"shell", a startup point for you applications. See the&nbsp; <A HREF="forms.html">special
section concerning forms.</A>
<H3>
Scripts</H3>
&nbsp;&nbsp; Scripts are normal Tcl/Tk code that is interpreted by Tcl/Tk.
You can define your own procedures inside a script called "Library" for
example. You can call your procedures from within another script, from
another procedure.
<BR>&nbsp;&nbsp; The most important thing is that you have total access
to the PgAccess core of functions and procedures used by me in building
PgAccess as an application. Just write <B><TT><FONT COLOR="#000080">open_table
"Your sample table"</FONT></TT></B> and you'll see the result.
<BR>&nbsp;&nbsp; If you are writing a script called "Autoexec" then it
will be executed every time the database is opened. You can put inside
different commands that you want to be executed such as : running scripts
that would define your own procedures such as <B><TT><FONT COLOR="#000080">execute_script
"My own procedure library"</FONT></TT></B> or open a form with <B><TT><FONT COLOR="#000080">open_form
"Main window with menu buttons"</FONT></TT></B> , and so on.
<P>
<HR WIDTH="100%">
<BR>Remember : I'm waiting your messages at <A HREF="mailto:teo@flex.ro">teo@flex.ro</A>
<P>
<HR WIDTH="50%">
</BODY>
</HTML>
<html>
<title> Visual Query Builder in Tcl/Tk </title>
<body bgcolor=white>
<h1> Visual Query Builder</h1>
<hr>
This visual query builder is included in <a href='http://www.flex.ro/pgaccess'>
PgAccess</a>, a visual interface to
<a href='http://www.postgreSQL.org'> PostgreSQL</a> written entirely in
vTcl , (Visual Tcl).
<p align="center">
<embed src="qbtclet.tcl" width=590 height=485>
</p>
<br>
Visual Query Designer demo<br>
Click <a href='qbtclet.tar.gz'>here</a> to download the source </a>
created by Constantin Teodorescu with vTcl (visual Tcl), teo@flex.ro
<hr>
Facitilies<br>
- drag and drop selection of fields<br>
- drag and drop fields from a table to another do create links<br>
- move table position by dragging<br>
- point and click any link or table then press delete to delete them<br>
- modify sort order by clicking on (unsorted)<br>
- enter filter conditions as criteria (>2000 , ='item')<br>
- easy panning of table and result panels<br>
- show SQL command<br>
<br>
If you want to use it for your database, modify ql_read_struct in order to read
your table structure.
<br>
Feel free to use, modify or copy this software for non-commercial purposes.<br>
In any other case, please contact me.
<br>
FLEX Consulting Braila, ROMANIA is able to deliver high end interfaces
and any other commercial products written in Tcl/Tk just like that you have seen.
</body>
</html>
This diff is collapsed.
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.61 [en] (X11; I; Linux 2.2.12 i586) [Netscape]">
</head>
<body bgcolor="#FEFEDF">
<h3>
Image gallery
<hr WIDTH="100%"></h3>
<ul>
<li>
&nbsp;<a href="mainwindow.gif">Main window</a> 9 Kb</li>
<li>
&nbsp;<a href="newtable.gif">Creating a new table</a> 9 Kb</li>
<li>
&nbsp;<a href="permissions.gif">Table access control</a> 10 Kb</li>
<li>
&nbsp;<a href="addindex.gif">Adding a new index</a> 12 Kb</li>
<li>
&nbsp;<a href="vdesigner.gif">The visual query designer</a> 16 Kb</li>
<li>
&nbsp;<a href="function.gif">Working with functions</a> 10 Kb</li>
<li>
&nbsp;<a href="forms.gif">Form designer</a> 19 Kb</li>
<li>
&nbsp;<a href="newuser.gif">User management</a> 4 Kb</li>
<li>
&nbsp;<a href="help.gif">Help</a> 7 Kb</li>
</ul>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>Special locale characters</TITLE>
<META NAME="GENERATOR" CONTENT="Mozilla/3.04Gold (X11; I; Linux 2.0.32 i586) [Netscape]">
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EF" VLINK="#51188E" ALINK="#FF0000">
<H1>Special locale characters and PgAccess
<HR WIDTH="100%"></H1>
<P>The problem is related with some special characters used in different
countries because PgAccess did not use fonts with `-ISO8859-1' encoding
-- </P>
<P>The sollution was proposed by H.P.Heidinger ( hph@hphbbs.ruhr.de) and
it's very simple.</P>
<P>If you look into PgAccess, you will find fonts declared as follows :</P>
<P><TT>$ grep -e '-font' -i pgaccess.tcl<BR>
-font -Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-* \<BR>
-font -Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-* \<BR>
-font -Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-* \<BR>
-font -Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-* \</TT></P>
<P>It should be something like: -adobe-helvetica-medium-r-normal-*-*-120-*-*-*-*-iso8859-1</P>
<P>You can achieve this by running the following script :</P>
<P><TT>#!/bin/sh<BR>
cp pgaccess.tcl pgaccess.tcl-org<BR>
cat pgaccess.tcl |\<BR>
sed -e's/\-\*\-\*\ /\-iso8859\-1\ /g' |\<BR>
sed -e's/\-\*\-\*\}/\-iso8859\-1}/g' |\<BR>
sed -e's/\-\*\-\*\]/\-iso8859\-1]/g' |\<BR>
sed -e's/\-\*\-\*$/\-iso8859\-1/g' |\<BR>
sed -e's/\-Clean\-/\-Fixed\-/g' |\<BR>
sed -e's/clean/fixed/g' &gt;pgaccess.iso<BR>
mv pgaccess.iso pgaccess.tcl<BR>
chmod +x pgaccess.tcl</TT></P>
<P>The final version of PgAccess (1.0) will let the user decide what fonts
will be used through a &quot;preferences&quot; dialog window.</P>
</BODY>
</HTML>
<html>
<body bgcolor="#FEFEDF">
<h2>ToDo List</h2><hr>
- Finish the report generator module<br>
- Enhance the form designer<br>
- Enhance the scripts module<br>
- Translations in other languages<br>
<br>
Please send any suggestions by mail to <a href="mailto:teo@flex.ro">Constantin Teodorescu</a>.
</body>
</html>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html><head><title>PgAccess - a Tcl/Tk interface for PostgreSQL</title></head>
<body bgcolor="#C0C0C0">
<h1>PgAccess - a Tcl/Tk interface for PostgreSQL</h1>
<hr>
<a name="intro">
<ul><li><a href="intro.html">Introduction</a>
<ul><li><a href="intro.html#whatpga">What is PgAccess?</a>
<li><a href="intro.html#helppga">How to get help with PgAccess</a>
</ul>
<a name="start">
<li><a href="start.html">Getting Started</a>
<ul><li><a href="start.html#getpga">How to get PgAccess</a>
<li><a href="start.html#uncpga">How to uncompress PgAccess</a>
<li><a href="start.html#putpga">Putting PgAccess where it will be found</a>
<li><a href="start.html#startpga">Starting PgAccess</a>
<li><a href="irix.html">Installing PgAccess under IRIX 5.3</a>
</ul>
<a name="problems">
<li><a href="problems.html">Common Initial Problems</a>
<ul><li><a href="problems.html#connfail">Connection failure</a>
<li><a href="problems.html#nonuser">User not defined</a>
<li><a href="problems.html#libpg">libpgtcl not found</a>
<li><a href="problems.html#spchar">Locale specific characters</a>
<li><a href="problems.html#pg63">Problems with PostgreSQL 6.3.x</a>
</ul>
<li><a href="tut.html">PgAccess tutorial</a>
<ul><li><a href="tut_user.html">User Administration</a>
<li><a href="tut_new.html">Creating a table</a>
<li><a href="tut_edit.html">Editing a table</a>
<li><a href="tut_sel1.html">Querying - SELECT</a>
</ul>
</body></html>
<html><head><title>PgAccess - Introduction</title></head>
<body bgcolor="#C0C0C0">
<h1>PgAccess - Introduction</h1>
<a name="whatpga"><h2>What is PgAccess?</h2>
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.<p>
Obviously, you <u>must</u> have PostgreSQL installed and running, and Tcl/Tk on
your system before you can use PgAccess.<p>
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.<p>
If you are not familiar with how open source software can be altered and
redistributed, please read <a href="copyright.html">this</a>.<p>
<a name="helppga"><h2>How to get help with PgAccess</h2>
The mailing list for PgAccess is: <b>pgsql-interfaces@postgresql.org</b><p>
If you have any questions regarding PgAccess you should subscribe to this
list in the following way:<p>
First subscribe to the list by sending an email message to:<p>
<samp>pgsql-interfaces-request@postgresql.org</samp><p>
Send a single line in the body of the message as follows:<p>
<samp>subscribe</samp><p>
In a short time you should receive a message beginning like this:<p>
<samp>Welcome to the pgsql-interfaces mailing list!<br>
...</samp><p>
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.<p>
You may also email <a href="mailto:teo@flex.ro">Constantin Teodorescu</a>
directly, although writing to a mailing list with many correspondents will often
produce a quicker answer.<p>
<a href="index.html#intro">Back to index</a>
</body></html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>PgAccess on Irix</TITLE>
<META NAME="GENERATOR" CONTENT="Mozilla/3.04Gold (X11; I; Linux 2.0.33 i586) [Netscape]">
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EF" VLINK="#51188E" ALINK="#FF0000">
<H1>INSTALLING PgAccess UNDER IRIX 5.3.
<HR WIDTH="100%"></H1>
<P><B><FONT COLOR="#000080">This HOWO-TO make PgAccess working under Irix
is written by Stuart Rison</FONT></B></P>
<P>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.).</P>
<P><B>1) Requirements:</B></P>
<UL>
<P>You will need:</P>
<UL>
<LI>postgreSQL source (http://www.postgresql.org)</LI>
<LI>tcl8.0 source (http://www.tclconsortium.org/)</LI>
<LI>tk8.0 source (http://www.tclconsortium.org/)</LI>
<LI>pgaccess source (http://www.flex.ro/pgaccess)</LI>
</UL>
</UL>
<P><B>2) Installation:</B></P>
<P>a) tcl/tk:</P>
<UL>
<P>You must first install tcl and then tk (in that order). I just used
./configure, no switches and gmake. Their installation should be trouble
free. Then you must move headers and libraries to the right places so:</P>
<P>Header files: both tcl and tk have a header file (tcl.h and tk.h). The
tcl.h file is in $tcl_source_dir/generic and the tk.h file is in $tk_source_dir/generic;
both should be copied to /usr/local/include.</P>
<P>Libraries: compilation (with cc) of tcl and tk yield libraries libtcl8.0.a
and libtk8.0.a in $source_dir/unix. Both should be copied to /usr/local/lib.</P>
</UL>
<P>b) postgreSQL:</P>
<UL>
<P>Make sure you have a fully patched postgreSQL source. If your ./configure
says it can't load 'IRIX' settings then you most probably will need to
patch ./configure.</P>
<P>Configure using ./configure with the following switches: ./configure
--with-includes=/usr/local/include</P>
<P>--with-libraries=/usr/local/lib --with-tcl [this and previous line as
one]</P>
<P>Then make, make install as usual</P>
</UL>
<P>c) Compiling libpgtcl:</P>
<UL>
<P>The source for libpgtcl is in $postgreSQL_directory/src/interfaces/libpgsql.</P>
<P>I do this twice. Once with just gmake. This produces a static library
libpgtcl.a which I leave where it is (I don't know what to do with it but
it may just come in handy). The I modify Makefile manually with a text
editor. Essentially I modify two line:</P>
<P>before:</P>
<P># Shared library stuff</P>
<P>install-shlib-dep := shlib :=</P>
<P>after:</P>
<P># Shared library stuff</P>
<P>install-shlib-dep := install-shlib shlib := libpgtcl.so.1</P>
<P>Then gmake -f Makefile_modified. This creates two shared (.so) libraries:
libpgtcl.so and libpgtcl.so.1. I can't tell the difference between them
so I copied them both to /usr/lib/.</P>
</UL>
<P>d) running pgaccess:</P>
<UL>
<P>Uncompress pgaccess (usually with gunzip and tar). So long as 'wish'
(a binary produced when compiling tk8.0) is somewhere in your path, you
should be able to run pgaccess with:</P>
<P>wish -f $pgaccess_dir/pgaccess.tcl [postgreSQL_database_name]</P>
</UL>
<P>e) et voila!</P>
<P><B>3) Concluding remarks:</B></P>
<UL>
<P>As I stated at the start of this document, following the procedure indicated
above worked for me. I am sure, however, that a few of the steps are unnecessary/non-optimised/stupid
etc. If any Unix (IRIX) boffin is reading this and you spot anything you
would like to comment/correct etc. please e-mail me (stuart@ludwig.ucl.ac.uk).
Also, if you just have questions and think I might help, please contact
me at the same e-mail.</P>
<P>Finally, I can accept no responsibility if these steps don't work for
you or if it all goes horribly wrong and you 'damage' your computer trying
them. Let common sense prevail!</P>
</UL>
<P>Good luck</P>
<P>Stuart Rison LICR University College London London W1P 8BT<BR>
<A HREF="mailto:stuart@ludwig.ucl.ac.uk">stuart@ludwig.ucl.ac.uk</A></P>
<a href="index.html#start">Back to index</a>
</BODY>
</HTML>
Cassileth, BR~Unorthodox Cancer Medicine~Cancer Investigation~~1986~4~6~591-598
<html><head><title>PgAccess - Common Problems</title></head>
<body bgcolor="#C0C0C0">
<h1>Common Problems with PgAccess</h1>
<a name="connfail"><h2>Connection failure</h2>
One of the most common initial problems is the message:<p>
<samp>Error connecting database<br>
Connection to database failed<br>
connectDB() failed: Is the<br>
postmaster running and<br>
accepting TCP/IP (with -i)<br>
connections at 'localhost' on<br>
port '5432'?</samp><p>
This usually occurs because the "postmaster" (the postgreSQL backend) was not
started with the <samp>-i</samp> option. Usually just adding <samp>-i</samp> to
the command line that starts the postmaster and restarting will fix this.<p>
If you have installed the prewritten script to start <b>postgreSQL</b>
automatically, this option is (currently) commented out:<p>
<samp># PGOPTS="-i"</samp><p>
just remove the hash and space and comment out the "blank" option above:<p>
<samp>PGOPTS=""</samp><p>
<a name="nonuser"><h2>User not defined</h2>
Initially, <b>postgreSQL</b> only has one user, <samp>postgres</samp>, and any
other user who starts up PgAccess will get the message:<p>
<samp>Error connecting database<br>
Connection to database failed<br>
FATAL 1: SetUserId: user<br>
'jim' is not in 'pg_shadow'</samp><p>
See <b>User Administration</b> in the <b>PgAccess tutorial</b> for a description
of how to create users.<p>
<a name="libpg"><h2>libpgtcl not found</h2>
PgAccess requires a library of functions named <samp>libpgtcl</samp>. 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 <samp>libpgtcl.so</samp> (perhaps with a number appended - or
<samp>libpgtcl.dll</samp> on Windows systems) on your
system. If not, you will have to download and perhaps compile this library.<p>
<samp>ftp://ftp.flex.ro/pub/pgaccess</samp><p>
is one place that you can download precompiled libpgtcl libraries for
PgAccess.<p>
<a name="spchar">
<h2>Locale specific characters</h2>
This problem occurs with some special characters used in different
countries because PgAccess did not use fonts with `-ISO8859-1' encoding.<p>
One solution was proposed by H.P.Heidinger ( hph@hphbbs.ruhr.de) and
is very simple.<p>
If you look in the file pgaccess.tcl, you will find the fonts declared in
this manner:<p>
<TT>$ grep -e '-font' -i pgaccess.tcl<BR>
-font -Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-* \<br>
...</TT></P>
The font declarations should be altered to:<p>
<tt>-font -Adobe-Helvetica-Medium-R-Normal-*-*-120-*-*-*-*-iso8859-1<br>
...</tt><p>
That is, inserting an asterisk between the first pair of hyphens, and changing
the final two asterisks to <samp>iso8859</samp> and <samp>1</samp>
respectively.<p>
You can alter the source code by running the following script :
<P><TT>#!/bin/sh<BR>
cp pgaccess.tcl pgaccess.tcl-org<BR>
cat pgaccess.tcl |\<BR>
sed -e's/\-\*\-\*\ /\-iso8859\-1\ /g' |\<BR>
sed -e's/\-\*\-\*\}/\-iso8859\-1}/g' |\<BR>
sed -e's/\-\*\-\*\]/\-iso8859\-1]/g' |\<BR>
sed -e's/\-\*\-\*$/\-iso8859\-1/g' |\<BR>
sed -e's/\-Clean\-/\-Fixed\-/g' |\<BR>
sed -e's/clean/fixed/g' &gt;pgaccess.iso<BR>
mv pgaccess.iso pgaccess.tcl<BR>
chmod +x pgaccess.tcl</TT><P>
The final version of PgAccess (1.0) will let the user decide what fonts
will be used through a &quot;preferences&quot; dialog window.</p>
<a name="pg63">
<h2>Problem with PostgreSQL 6.3.x</h2>
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.<p>
In the procedure <tt>wpg_exec</tt> change the following line:<p>
<tt>set pgsql(errmsg) [pg_result $pgsql(res) -error]</tt><p>
to this:<p>
<tt>set pgsql(errmsg) "NO ERROR INFORMATION SUPPLIED"</tt><p>
and the program will work. The only disadvantage is that with some error
conditions, you will not get the appropriate error message from libpgtcl.<p>
<a href="index.html#problems">Back to index</a>
</body></html>
<html><head><title>PgAccess - Getting Started</title></head>
<body bgcolor="#C0C0C0">
<h1>PgAccess - Getting Started</h1>
<a name="getpga"><h2>How to get PgAccess</h2>
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:<p>
<samp>http://www.flex.ro</samp><p>
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).<p>
<a name="uncpga"><h2>How to uncompress PgAccess</h2>
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.<p>
<h3>UNIX (Linux, BSD, IRIX, Solaris, etc.)</h3>
The files will be compressed using "gzip" and packaged using "tar", and have
filenames like this:<p>
<samp>pgaccess-n.nn.tar.gz</samp><p>
Note that "n.nn" will be the version number in an actual file.<p>
First decide where you want to have the program. A typical location on UNIX
systems is <samp>/usr/local/src/&lt;name&gt;</samp>, where &lt;name&gt; is the name of
the program. To use this location, download or move the "tar.gz" file to the
directory <samp>/usr/local/src</samp>. Change to that directory, and
uncompress the file with the command:<p>
<samp>tar -zxvf pgaccess-n.nn.tar.gz</samp><p>
You should see the files listed as they are uncompressed and placed in the new
directory, and now have a directory named:<p>
<samp>/usr/local/src/pgaccess</samp><p>
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.
<h3>Windows</h3>
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.<p>
<a name="putpga"><h2>Putting PgAccess where it will be found</h2>
<h3>UNIX</h3>
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:<p>
<samp>echo $PATH<br>
/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:./:/usr/local/pgsql/bin
</samp><p>
Usually the directory <samp>/usr/local/bin</samp> will be in your PATH, and that
is a fairly common place to put programs like PgAccess. Other common
directories in the PATH are <samp>/usr/bin</samp> and <samp>/usr/sbin</samp>.
Simply move the file "pgaccess.tcl" to the directory where you want it.<p>
<h3>Windows</h3>
You will usually link PgAccess to an icon, so just specify the full path to the
program when you create the icon.
<a name=startpga"><h2>Starting PgAccess</h2>
The easiest way to start PgAccess is to simply invoke the program by name:<p>
<samp>pgaccess.tcl</samp><p>
If the program has been placed in a directory listed in the PATH, the PgAccess
window should appear.<p>
<h3>Starting from a menu</h3>
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
<samp>/etc/X11/wmconfig</samp> with the following contents:<p>
<samp>pgaccess name "PgAccess"<br>
pgaccess description "postgreSQL frontend"<br>
pgaccess mini-icon "mini-pgaccess.xpm"<br>
pgaccess group "Applications"<br>
pgaccess exec "pgaccess.tcl &"</samp><p>
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 <samp>/usr/share/icons/mini</samp> 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.<p>
<a href="index.html#start">Back to index</a>
</body></html>
<html><head><title>PgAccess - Tutorial</title></head>
<body bgcolor="#C0C0C0">
<h1>PgAccess - Tutorial</h1>
<a name="admin"><h2>User Administration</h2>
The procedure for setting up <b>postgreSQL</b> usually results in a single user
named <samp>postgres</samp>. In order for anyone else to use <b>postgreSQL</b>,
users must be added. The program <samp>createuser</samp> accomplishes this.
First become the PostgreSQL administrator (usually <samp>postgres</samp>):<p>
<samp>su postgres</samp><p>
Then create a new user:<p>
<samp>createuser jim<br>
Enter user's postgres ID or RETURN to use unix user ID: 500 -&gt;<br>
Is user "jim" allowed to create databases (y/n) y<br>
Is user "jim" a superuser? (y/n) n<br>
createuser: jim was successfully added</samp><p>
You can use either the UNIX user ID or the postgres ID to identify users. See
the <b>postgreSQL</b> documentation in the "admin" section for a fuller
account of users and groups.<p>
To remove users, use the <samp>destroyuser</samp> command in the same way.<p>
<img src="screen1.jpg" border=1 align=right>
<a name="basic"><h2>Basic use of PgAccess</h2>
<h3>Creating a database</h3>
At the right is the window you should see when PgAccess starts up. The first
task for most users will be to create a database.<p>
Press the <em>New</em> button to bring up the window shown below. This will
allow you to specify the structure of the new table. It is important to note
that if you haven't specified a database when starting up PgAccess, this table
will be created in the database named <samp>&lt;username&gt;</samp>, your
username.<p>
Assume that you want to create a table with entries describing bibliographic
references in the field of chemistry. Choose a table name, such as
<samp>chemref</samp> that will be easy to recall and find in a list. Enter the
table name in the first input field.<p>
When you already have tables in a database, you can use the <em>Inherits</em>
button to toggle a list of existing tables to inherit characteristics of another
table. In this example, there should be no previous tables to use.<p>
Enter each field, giving it a name, field type and size, if the field type does
not imply the size. That is, if your first field was to be a sequence number,
and you selected <em>int2</em> as the field type, you would not have to specify
a field size. However, if your second field was to contain the author of the
reference, and was a <em>varchar</em> type, you would have to specify how many
characters would be allowed in the field.<p>
As you enter each field, click the <em>Add field</em> button to add it to the
list at the right side of the window. You can change the position of fields
using the <em>Move field up</em> and <em>Move field down</em> buttons, or delete
a field if you decide it isn't what you wanted. When you are finished
specifying fields, press the <em>Create table</em> button.<p>
<img src="newtable.jpg" border=1 align=right>
<a href="index.html#tut">Back to index</a>
</body></html>
<html><head><title>PgAccess Tutorial</title></head>
<body bgcolor="#C0C0C0">
<h1>PgAccess Tutorial - Editing a table</h1>
<img src="sel_tbl.jpg" border=1 align=right>
<h2>Adding records</h2>
Once you have a table, you can begin to add entries to it. In the main
PgAccess window, when you click the <em>Tables</em> button, you should see the
new table appear in the list of tables. Highlighting the table name by clicking
on it and clicking on the <em>Open</em> button will open that table in another
window, as shown below.<p>
The most straighforward way to add records to a table is to type the information
directly into the fields. Two records have been entered in the table shown. As
is common with this user interface, clicking the mouse while the pointer is in a
field will allow keyboard entry to that field. This type of entry is adequate
when the information arrives infrequently in small parcels, for instance in
keeping a table of contact information about other researchers. However, what
do you do when someone emails you the entire reference list for their doctoral
dissertation?<p>
This is best handled using the SQL <em>COPY</em> command.
First, the information will have to be massaged into shape in what is called a
'flat' ASCII file. This is simply a text file in which each line is a record,
and each field in each record is separated by a <em>delimiter</em> such as a
tilde (~). The fields will have to be in the same order as those in your table,
and there will have to be the same number of fields in each record as are in the
table, otherwise you may get unexpected data or no data at all. Say you produce
a text file named <samp>newref.txt</samp> that starts like this:<p>
<samp>Cassileth, BR~Unorthodox Cancer Medicine~Cancer Investigation~~1986~4~6~591-598
<br>...</samp><p>
Notice that there are two consecutive tildes to allow for the fact that this
particular entry doesn't have anything in the <b>Editor</b> field.
You can then perform a <em>Query</em> as follows:<p>
<samp>COPY psyref FROM '/home/jim/newref.txt' USING DELIMITERS
'~';</samp><p>
This will read the records from <samp>newref.txt</samp> and insert them into the
table <samp>psyref</samp>. See the PostgreSQL documentation under the headings
<br><b>Tutorial|The Query Language|Populating a Class with Instances</b><p>
<img src="addref.jpg" border=1 align=right>
<a href="index.html#tut">Back to index</a>
</body></html>
<html><head><title>PgAccess Tutorial</title></head>
<body bgcolor="#C0C0C0">
<h1>PgAccess Tutorial - Creating a table</h1>
<img src="screen1.jpg" border=1 align=right>
<h2>Creating a table</h2>
At the right is the window you should see when PgAccess starts up. The first
task for most users will be to create a database. Notice the 'buttons' at the
left of the main window. Clicking on these allows you to see the names of
different <em>objects</em> that are stored in your database, which should be
empty at the moment.<p>
Click the <em>Tables</em> and <em>New</em> buttons to bring up the window shown
below. This will allow you to specify the structure of the new table. It is
important to note that if you haven't specified a database when starting up
PgAccess, this table will be created in the database named
<samp>&lt;username&gt;</samp>, your username.<p>
Assume that you want to create a table with entries describing bibliographic
references in the field of psychology. Choose a table name, such as
<samp>psyref</samp> that will be easy to recall and find in a list. Enter the
table name in the first input field.<p>
When you already have tables in a database, you can use the <em>Inherits</em>
button to toggle a list of existing tables to inherit characteristics of another
table. In this example, there should be no previous tables to use.<p>
Enter each field, giving it a name, field type and size, if the field type does
not imply the size. That is, if your first field was to be a sequence number,
and you selected <em>int2</em> as the field type, you would not have to specify
a field size. However, if your second field was to contain the author of the
reference, and was a <em>varchar</em> type, you would have to specify how many
characters would be allowed in the field.<p>
As you enter each field, click the <em>Add field</em> button to add it to the
list at the right side of the window. You can change the position of fields
using the <em>Move field up</em> and <em>Move field down</em> buttons, or delete
a field if you decide it isn't what you wanted. When you are finished
specifying fields, press the <em>Create table</em> button.<p>
<img src="newtable.jpg" border=1 align=right>
<a href="index.html#tut">Back to index</a>
</body></html>
<html><head><title>PgAccess Tutorial</title></head>
<body bgcolor="#C0C0C0">
<h1>PgAccess Tutorial - SELECT</h1>
<img src="altern_q.jpg" border=1 align=right>
<h2>What is a query?</h2>
<em>Query</em> is the term for an SQL command which will perform an operation
on a table. It is sometimes confusing to newcomers, as some of the operations
seem to have nothing to do with querying in the common sense of <em>asking</em>.
As we saw in the previous section, a <em>query</em> can simply copy
records from an ASCII file to a table.<p>
The PostgreSQL documentation has a complete list of <em>queries</em> that can be
used. We'll start with the common task of selecting records with certain
characteristics.<p>
<h2>Selecting records</h2>
<img src="altern_v.jpg" border=1 align=right>
Suppose that I want to know all of the references in the sample table
<em>psyref</em> for which the word "alternative" appeared in the title.<p>
By clicking <em>Query</em>, then <em>New</em>, a <b>Query builder</b> window will
appear. Clicking in the area below the buttons will allow the user to enter an
SQL <em>query</em>. The specification of the <em>query</em> must be exact or
PostgreSQL will return an error message.<p>
The <em>query</em> shown will <b>SELECT</b> those records from <em>psyref</em>
that contain the word "alternative" anywhere in the <em>title</em> field. The
'*' indicates that all of the fields are to be returned. You might only want to
return, for instance, the <em>author</em> field if you were only interested in
which authors had used that word in the title of their work.<p>
At the right is the record that fulfils these conditions, displayed in the
<b>Table viewer</b>. If you wanted to save this query for use again,
clicking the <em>Save query definition</em> button will do so. You will then
see <em>altern</em> listed under <em>Queries</em> when you return to the main
window. By clicking the <em>Save this query as a view</em> tickbox in the
<b>Query builder</b>, the result of your query will be saved as a
<em>View</em> which you can access from <em>Views</em> in the main window.
Click the <em>Close</em> button to leave the <b>Query builder</b>.<p>
<a href="index.html#tut">Back to index</a>
</body></html>
<html><head><title>PgAccess Tutorial</title></head>
<body bgcolor="#C0C0C0">
<h1>PgAccess Tutorial - User Administration</h1>
While user administration is really not a part of the PgAccess program, it is
such a basic operation that a brief description is given here.
<h2>Creating users</h2>
The procedure for setting up <b>postgreSQL</b> usually results in a single user
named <samp>postgres</samp>. In order for anyone else to use <b>postgreSQL</b>,
users must be added. The program <samp>createuser</samp> accomplishes this.
First become the PostgreSQL administrator (usually <samp>postgres</samp>):<p>
<samp>su postgres</samp><p>
Then create a new user:<p>
<samp>createuser jim<br>
Enter user's postgres ID or RETURN to use unix user ID: 500 -&gt;<br>
Is user "jim" allowed to create databases (y/n) y<br>
Is user "jim" a superuser? (y/n) y<br>
createuser: jim was successfully added</samp><p>
You can use either the UNIX user ID or the postgres ID to identify users. See
the <b>postgreSQL</b> documentation in the "admin" section for a fuller
account of users and groups.<p>
The reason for using the command line to create the first user (other than
<em>postgres</em>) is that <em>postgres</em> may not have X-Window permission.
You can also create users using <b>PgAccess</b> if you are created as a
<em>superuser</em> as shown in the example above.<p>
<h2>Removing users</h2>
To remove users, use the <samp>destroyuser</samp> command in the same way.<p>
<a href="index.html#tut">Back to index</a>
</body></html>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.61 [en] (X11; I; Linux 2.2.11 i586) [Netscape]">
</head>
<body bgcolor="#FEFEDF">
<b>29 August 1999</b> - PgAccess 0.98 has been released!
<ul>
<li>
international version (romanian, french, italian translations available)
in separate files (japanese translation now possible)</li>
<li>
context sensitive help, complete help for SQL commands</li>
<li>
geometry changes for many forms</li>
<li>
form designer enhancements (widget icons , new attribute window style,
form startup script)</li>
<li>
ability to inspect PostgreSQL system tables (preferences)</li>
<li>
enhanced table design window, table permissions</li>
<li>
distribution archive changes</li>
<li>
unified internal global variables</li>
<li>
unified internal window naming conventions</li>
<li>
usage of Tcl namespaces for all modules</li>
<li>
PgAccess developer <a href="api.html">API</a></li>
<li>
web site enhancements</li>
</ul>
</body>
</html>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.61 [en] (X11; I; Linux 2.2.11 i586) [Netscape]">
</head>
<body bgcolor="#FEFEDF">
<h2>
PgAccess on Win32</h2>
<hr>In order to run PgAccess on a Win32 workstation you should follow the
following steps:
<ol>
<li>
download and install a Tcl/Tk package from <a href="http://www.scriptics.com">Scriptics</a>
(8.0.x or 8.1.x)</li>
<li>
install PgAccess package</li>
<li>
check the Tcl/Tk version that you have</li>
<li>
check the PostgreSQL version installed on your database server machine</li>
<li>
get from win32/dll directory the appropriate libraries suitable for your
Tcl/Tk version and PostgreSQL version and copy them into your Windows/System
directory renaming them as libpq.dll and libpgtcl.dll</li>
<li>
check if your win32 workstation is able to see your database server (ping
yourdatabaseserver)</li>
<li>
ask your database administrator to verify if your win32 workstation has
access rights to the database (pg_hba.conf)</li>
</ol>
<p><br>You should be able to run PgAccess.
<br>&nbsp;
</body>
</html>
CREATE TABLE "pga_queries" ("queryname" varchar(64), "querytype" char(1), "querycommand" "text");
CREATE TABLE "pga_forms" ("formname" varchar(64), "formsource" "text");
CREATE TABLE "pga_scripts" ("scriptname" varchar(64), "scriptsource" "text");
CREATE TABLE "pga_reports" ("reportname" varchar(64), "reportsource" "text", "reportbody" "text", "reportprocs" "text", "reportoptions" "text");
CREATE TABLE "phonebook" ("name" varchar(32), "phone_nr" varchar(16), "city" varchar(32), "company" "bool", "continent" char(16));
CREATE TABLE "pga_layout" ("tablename" varchar(64), "nrcols" "int2", "colnames" "text", "colwidth" "text");
COPY "pga_queries" FROM stdin;
Query that can be saved as view S select * from phonebook where continent='usa'
\.
COPY "pga_forms" FROM stdin;
A simple demo form asdf 14 {1 2 3 4 5 6 7 8 9 10 11 12 13 14} 377x315+170+155 {label label1 {15 36 99 57} {} {Selected color} {}} {entry entry2 {111 36 225 54} {} entry2 color} {radio red {249 21 342 36} {} {Red as cherry} color} {radio green {249 45 342 60} {} {Green as a melon} color} {radio blue {249 69 342 84} {} {Blue as the sky} color} {button button6 {45 69 198 99} {set color spooky} {Set a weird color} {}} {label label7 {24 129 138 147} {} {The checkbox's value} {}} {entry entry8 {162 129 172 147} {} entry8 cbvalue} {checkbox checkbox9 {180 126 279 150} {} {Check me :-)} cbvalue} {button button10 {219 273 366 303} {destroy .asdf} {Close that simple form} {}} {button button11 {219 237 366 267} {open_form "Phone book"} {Open my phone book} {}} {listbox lb {12 192 162 267} {} listbox12 {}} {button button13 {12 156 162 186} {.asdf.lb insert end red green blue cyan white navy black purple maroon violet} {Add some information} {}} {button button14 {12 273 162 303} {.asdf.lb delete 0 end} {Clear this listbox} {}}
Phone book pb 26 {1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26} 444x310+284+246 {label label1 {33 12 63 30} {} Name {}} {entry name_entry {87 9 217 30} {} entry2 pbqs(name)} {label label3 {33 39 73 54} {} Phone {}} {entry entry4 {87 36 195 57} {} entry4 pbqs(phone_nr)} {label label5 {33 66 78 84} {} City {}} {entry entry6 {87 63 195 84} {} entry6 pbqs(city)} {query qs {3 6 33 33} {} query7 {}} {button button8 {126 177 198 203} {.pb.qs:setsql "select oid,* from phonebook where name ~* '$what' order by name"\
.pb.qs:open\
set nrecs [.pb.qs:nrecords]\
.pb.qs:updatecontrols\
.pb.qs:fill .pb.allnames name\
bind .pb.allnames <ButtonRelease-1> {\
set ancr [.pb.allnames curselection]\
if {$ancr!=""} {\
\ .pb.qs:moveto $ancr\
\ .pb.qs:updatecontrols\
}\
}} Find {}} {button button9 {159 276 229 302} {.pb.qs:close\
.pb.qs:clearcontrols\
set nrecs {}\
set what {}\
destroy .pb\
} Exit {}} {button button10 {102 249 124 269} {.pb.qs:movefirst\
.pb.qs:updatecontrols\
} |< {}} {button button11 {129 249 151 269} {.pb.qs:moveprevious\
.pb.qs:updatecontrols\
} << {}} {button button12 {156 249 178 269} {.pb.qs:movenext\
.pb.qs:updatecontrols} >> {}} {button button13 {183 249 205 269} {.pb.qs:movelast\
.pb.qs:updatecontrols\
} >| {}} {checkbox checkbox14 {33 87 126 105} {} {Is it a company ?} pbqs(company)} {radio usa {63 108 201 120} {} U.S.A. pbqs(continent)} {radio europe {63 126 204 141} {} Europe pbqs(continent)} {radio africa {63 144 210 159} {} Africa pbqs(continent)} {entry entry18 {30 180 117 198} {} entry18 what} {label label19 {108 219 188 234} {} {records found} {}} {label label20 {90 219 105 234} {} { } nrecs} {label label21 {3 252 33 267} {} OID= {}} {label label22 {39 252 87 267} {} { } pbqs(oid)} {button button23 {9 276 79 302} {set oid {}\
catch {set oid $pbqs(oid)}\
if {[string trim $oid]!=""} {\
sql_exec noquiet "update phonebook set name='$pbqs(name)', phone_nr='$pbqs(phone_nr)',city='$pbqs(city)',company='$pbqs(company)',continent='$pbqs(continent)' where oid=$oid"\
} else {\
tk_messageBox -title Error -message "No record is displayed!"\
}\
\
} Update {}} {button button24 {84 276 154 302} {set thisname {}\
catch {set thisname $pbqs(name)}\
if {[string trim $thisname]!=""} {\
sql_exec noquiet "insert into phonebook values ('$pbqs(name)','$pbqs(phone_nr)','$pbqs(city)','$pbqs(company)','$pbqs(continent)')"\
tk_messageBox -title Information -message "A new record has been added!"\
} else {\
tk_messageBox -title Error -message "This one doesn't have a name ?\
}\
\
} {Add new} {}} {button button25 {168 111 231 135} {.pb.qs:clearcontrols\
# clearcontrols stillinitialise\
# incorectly booleans controls to {}\
# so I force it to 'f' (false)\
set pbqs(company) f\
focus .pb.name_entry} New {}} {listbox allnames {246 12 432 240} {} listbox26 {}}
\.
COPY "pga_scripts" FROM stdin;
How are forms keeped inside ? open_table pga_forms\
\
\.
COPY "pga_reports" FROM stdin;
\.
COPY "phonebook" FROM stdin;
IBM 623346234 \N t usa
John Doe +44 35 2993825 Washington f usa
Bill Clinton +44 35 9283845 New York f usa
Monica Levintchi +44 38 5234526 Dallas f usa
Bill Gates +42 64 4523454 Los Angeles f usa
COMPAQ 623462345 \N t usa
SUN 784563253 \N t usa
DIGITAL 922644516 \N t usa
FIAT 623463445 \N t europe
MUGADUMBU +92 534662634 \N t africa
Frank Zappa 6734567 Montreal f usa
Jimmy Page 66323452 f europe
Constantin Teodorescu +40 39 611820 Braila f europe
Ngbendu Wazabanga 34577345 f africa
Victor Ciorbea 634567 Bucuresti f europe
Mugabe Kandalam 7635745 f africa
\.
COPY "pga_layout" FROM stdin;
pga_forms 2 formname formsource 82 713
phonebook 5 name phone_nr city company continent 150 105 80 66 85
Usaisti 5 name phone_nr city company continent 150 150 150 150 150
q1 5 name phone_nr city company continent 150 150 150 150 150
view_saved_from_that_query 5 name phone_nr city company continent 150 150 150 150 150
\.
This diff is collapsed.
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.5 [en] (X11; I; Linux 2.0.36 i586) [Netscape]">
<title>PgAccess - a Tcl/Tk PostgreSQL interface</title>
</head>
<body bgcolor="#FFFFFF">
<h1>
PgAccess - a free database management tool for <a href="http://www.postgreSQL.org">PostgreSQL</a></h1>
<hr>
<li>
Download the last version of PgAccess <a href="pgaccess-0.96.tar.gz">(press
shift and click this link) (tar.gz file)</a>&nbsp; or&nbsp;&nbsp; <a href="pgaccess.zip">this
one (zip file for Windows)</a></li>
<p><br>
<center>
<p>Latest stable version of PgAccess is 0.96 , released 9 March 1999
!
<p><font size=+2>PgAccess 0.93 and higher will not work from the begining
with PostgreSQL 6.3.x !!<br>
Read <a href="pg93patch.html">here</a> how to apply a simple patch in order
to make it work !</font>
<br>&nbsp;
<p><font size=+2><b><font color="#FF0000">NEW *</font></b> <b><font color="#FF0000">NEW
*</font></b></font><b><font color="#FF0000">&nbsp;</font><font color="#000000"><font size=+1>
==> </font><font size=+2>Microsoft Windows compatible version</font></font></b>
<p>&nbsp; <b><font color="#FF0000">NEW *</font></b> ==== > <b>PostgreSQL
user management, multiple table views</b>,. <b>Query parameters</b> (see
section Queries below)
<p>Precompiled libpgtcl and libpq binaries and dll's for i386 are <a href="ftp://ftp.flex.ro/pub/pgaccess">here
</a>!!!</center>
<h3>
<font color="#000080">Installation problems</font></h3>
<ul>
<li>
Some problems related with locale special characters could be solved by
this <a href="specialchars.html">simple patch</a></li>
<li>
I think that there were some problems loading libpgtcl library. I invite
you to read a <a href="index.html#libpgtcl">special section concerning
libpgtcl</a></li>
<li>
For Silicon Graphics Indigo computers, Irix operating system, there is
a <a href="irix.html">HOWTO make PgAccess to work</a></li>
</ul>
<h3>
<font color="#191970">What does PgAccess now!</font></h3>
Here are some screenshots from PgAccess windows : <a href="pic-pga-1.gif">Main
window </a>, <a href="pic-pga-2.gif">table builder </a>, <a href="pic-pga-4.gif">table(query)
view </a>, <a href="pic-pga-3.gif">visual query builder </a>.
<p><b>Tables</b>
<br>- opening multiple tables for viewing, max. n records (changed by preferences
menu)
<br>- column resizing, dragging the vertical grid line (better in table
space rather than in the table header)
<br>- text wrap in cells - layout saved for every table
<br>- import/export to external files (SDF,CSV)
<br>- filter capabilities (enter filter like (price>3.14)
<br>- sort order capabilities (enter manually the sort field(s))
<br>- editing in place
<br>- improved table generator assistant
<br>- improved field editing
<br><b>Queries</b>
<br>- define , edit and stores "user defined queries"
<br>- store queries as views
<br>- execution of queries with optional user input parameters ( select
* from invoices where year=[parameter "Year of selection"] )
<br>- viewing of select type queries result
<br>- query deleting and renaming
<br>- visual query builder with drag &amp; drop capabilities. For any of
you who had installed the Tcl/Tk plugin for Netscape Navigator, you can
see it at work <a href="qbtclet.html">clicking here</a>
<br><b>Sequences</b>
<br>- defines sequences, delete them and inspect them
<br><b>Functions</b>
<br>- define, inspect and delete functions in SQL language
<br><b>Reports</b>
<br>- design and display simple reports from tables
<br>- fields and labels, font changing, style and size
<br>- saves and loads report description from database
<br>- show report previews, sample postscript output file
<br><b>Forms</b>
<br>- open user defined forms
<br>- form design module available
<br>- query widget available, controls bound to query results
<br>- <a href="forms.html">click here</a> for a description of forms and
how they can be used
<br><b>Scripts</b>
<br>- define, modify and call user defined scripts
<br><b>Users</b>
<br>- define and modify user parameters
<p>Here is <a href="pga-rad.html">a special section concerning forms and
scripts</a> .
<p>This program is protected by the following <a href="copyright.html">copyright</a>
<p>If you have any comment, suggestion for improvements, please feel free
to e-mail to : <a href="mailto:teo@flex.ro">teo@flex.ro</a>
<p><b><font color="#FF1493"><font size=+2>Mailing list for PgAccess </font></font></b><a href="maillist.html">Here
you will find how to subscribe to this mailing list</a>.
<p>
<hr>
<h1>
More information about libpgtcl - downloads</h1>
&nbsp;&nbsp;&nbsp;&nbsp; Also, you will need the PostgreSQL to Tcl interface
library, lined as a Tcl/Tk 'load'-able module. It is called libpgtcl and
the source is located in the PostgreSQL directory /src/interfaces/libpgtcl.
Specifically, you will need a libpgtcl library that is 'load'-able from
Tcl/Tk.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This is technically different from
an ordinary PostgreSQL loadable object file, because libpgtcl is a collection
of object files. Under Linux, this is called libpgtcl.so.
<p>&nbsp;&nbsp;&nbsp;&nbsp; One of the solutions is to remove from the
source the line containing <b>load libpgtcl.so </b>and to load pgaccess.tcl
not with wish, but with pgwish (or wishpg) that wish that was linked with
libpgtcl library! I do not recommend this one.
<p>&nbsp;&nbsp;&nbsp;&nbsp; If you have installed RedHat 5.x, you should
get the last distribution kit of PostgreSQL and compile it from scratch.
RedHat 5.x is using some new versions of libraries and you have to compile
and install again at least <b>libpq </b>and <b><tt>libpgtcl </tt></b>libraries.
<p>&nbsp;&nbsp;&nbsp; PostgreSQL 6.4 release has a minor bug. I does not
includ by default the crypt lib when compiling libpgtcl. So, you will need
to manually add a -lcrypt to SHLIB line in Makefile in src/interfaces/libpgtcl
and then make clean and make again. The new libpgtcl.so library is properly
configured to run pgaccess.
<br>&nbsp;
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>PgAccess on Irix</TITLE>
<META NAME="GENERATOR" CONTENT="Mozilla/3.04Gold (X11; I; Linux 2.0.33 i586) [Netscape]">
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EF" VLINK="#51188E" ALINK="#FF0000">
<H1>INSTALLING PgAccess UNDER IRIX 5.3.
<HR WIDTH="100%"></H1>
<P><B><FONT COLOR="#000080">This HOWO-TO make PgAccess working under Irix
is written by Stuart Rison</FONT></B></P>
<P>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.).</P>
<P><B>1) Requirements:</B></P>
<UL>
<P>You will need:</P>
<UL>
<LI>postgreSQL source (http://www.postgresql.org)</LI>
<LI>tcl8.0 source (http://www.tclconsortium.org/)</LI>
<LI>tk8.0 source (http://www.tclconsortium.org/)</LI>
<LI>pgaccess source (http://www.flex.ro/pgaccess)</LI>
</UL>
</UL>
<P><B>2) Installation:</B></P>
<P>a) tcl/tk:</P>
<UL>
<P>You must first install tcl and then tk (in that order). I just used
./configure, no switches and gmake. Their installation should be trouble
free. Then you must move headers and libraries to the right places so:</P>
<P>Header files: both tcl and tk have a header file (tcl.h and tk.h). The
tcl.h file is in $tcl_source_dir/generic and the tk.h file is in $tk_source_dir/generic;
both should be copied to /usr/local/include.</P>
<P>Libraries: compilation (with cc) of tcl and tk yield libraries libtcl8.0.a
and libtk8.0.a in $source_dir/unix. Both should be copied to /usr/local/lib.</P>
</UL>
<P>b) postgreSQL:</P>
<UL>
<P>Make sure you have a fully patched postgreSQL source. If your ./configure
says it can't load 'IRIX' settings then you most probably will need to
patch ./configure.</P>
<P>Configure using ./configure with the following switches: ./configure
--with-includes=/usr/local/include</P>
<P>--with-libraries=/usr/local/lib --with-tcl [this and previous line as
one]</P>
<P>Then make, make install as usual</P>
</UL>
<P>c) Compiling libpgtcl:</P>
<UL>
<P>The source for libpgtcl is in $postgreSQL_directory/src/interfaces/libpgsql.</P>
<P>I do this twice. Once with just gmake. This produces a static library
libpgtcl.a which I leave where it is (I don't know what to do with it but
it may just come in handy). The I modify Makefile manually with a text
editor. Essentially I modify two line:</P>
<P>before:</P>
<P># Shared library stuff</P>
<P>install-shlib-dep := shlib :=</P>
<P>after:</P>
<P># Shared library stuff</P>
<P>install-shlib-dep := install-shlib shlib := libpgtcl.so.1</P>
<P>Then gmake -f Makefile_modified. This creates two shared (.so) libraries:
libpgtcl.so and libpgtcl.so.1. I can't tell the difference between them
so I copied them both to /usr/lib/.</P>
</UL>
<P>d) running pgaccess:</P>
<UL>
<P>Uncompress pgaccess (usually with gunzip and tar). So long as 'wish'
(a binary produced when compiling tk8.0) is somewhere in your path, you
should be able to run pgaccess with:</P>
<P>wish -f $pgaccess_dir/pgaccess.tcl [postgreSQL_database_name]</P>
</UL>
<P>e) et voila!</P>
<P><B>3) Concluding remarks:</B></P>
<UL>
<P>As I stated at the start of this document, following the procedure indicated
above worked for me. I am sure, however, that a few of the steps are unnecessary/non-optimised/stupid
etc. If any Unix (IRIX) boffin is reading this and you spot anything you
would like to comment/correct etc. please e-mail me (stuart@ludwig.ucl.ac.uk).
Also, if you just have questions and think I might help, please contact
me at the same e-mail.</P>
<P>Finally, I can accept no responsibility if these steps don't work for
you or if it all goes horribly wrong and you 'damage' your computer trying
them. Let common sense prevail!</P>
</UL>
<P>Good luck</P>
<P>Stuart Rison LICR University College London London W1P 8BT<BR>
<A HREF="mailto:stuart@ludwig.ucl.ac.uk">stuart@ludwig.ucl.ac.uk</A></P>
</BODY>
</HTML>
namespace eval Database {
proc {getTablesList} {} {
global CurrentDB PgAcVar
set tlist {}
if {[catch {
wpg_select $CurrentDB "select c.relname,count(c.relname) from pg_class C, pg_rewrite R where (r.ev_class = C.oid) and (r.ev_type = '1') group by relname" rec {
if {$rec(count)!=0} {
set itsaview($rec(relname)) 1
}
}
if {! $PgAcVar(pref,systemtables)} {
wpg_select $CurrentDB "select relname from pg_class where (relname !~ '^pg_') and (relkind='r') order by relname" rec {
if {![regexp "^pga_" $rec(relname)]} then {
if {![info exists itsaview($rec(relname))]} {
lappend tlist $rec(relname)
}
}
}
} else {
wpg_select $CurrentDB "select relname from pg_class where (relkind='r') order by relname" rec {
if {![info exists itsaview($rec(relname))]} {
lappend tlist $rec(relname)
}
}
}
} gterrmsg]} {
showError $gterrmsg
}
return $tlist
}
proc {vacuum} {} {
global PgAcVar CurrentDB
if {$CurrentDB==""} return;
set PgAcVar(statusline,dbname) [format [intlmsg "vacuuming database %s ..."] $PgAcVar(currentdb,dbname)]
setCursor CLOCK
set pgres [wpg_exec $CurrentDB "vacuum;"]
catch {pg_result $pgres -clear}
setCursor DEFAULT
set PgAcVar(statusline,dbname) $PgAcVar(currentdb,dbname)
}
proc {getPgType} {oid} {
global CurrentDB
set temp "unknown"
wpg_select $CurrentDB "select typname from pg_type where oid=$oid" rec {
set temp $rec(typname)
}
return $temp
}
proc {executeUpdate} {sqlcmd} {
global CurrentDB
return [sql_exec noquiet $sqlcmd]
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment