Commit a34ce62f authored by Bruce Momjian's avatar Bruce Momjian

Update pgaccess to 0.98.5

parent e854d3da
...@@ -22,7 +22,7 @@ PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. ...@@ -22,7 +22,7 @@ PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
PGACCESS 0.98 29 August 1999 PGACCESS 0.98.4 29 January 2000
================================ ================================
I dedicate this program to my little daughters Ana-Maria and Emilia and to my 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 wife for their understanding. I hope they will forgive me for spending so many
......
...@@ -38,12 +38,10 @@ CREATE TABLE "pga_schema" ( ...@@ -38,12 +38,10 @@ CREATE TABLE "pga_schema" (
REVOKE ALL on "pga_schema" from PUBLIC; REVOKE ALL on "pga_schema" from PUBLIC;
GRANT ALL on "pga_schema" to PUBLIC; GRANT ALL on "pga_schema" to PUBLIC;
CREATE TABLE "cities" ( CREATE TABLE "cities" (
"id" int4 DEFAULT nextval('"cities_id_seq"') NOT NULL, "id" int4 DEFAULT nextval ( '"cities_id_seq"' ) NOT NULL,
"name" character varying(32) NOT NULL, "name" character varying(32) NOT NULL,
"prefix" character varying(16) NOT NULL); "prefix" character varying(16) NOT NULL);
REVOKE ALL on "cities" from PUBLIC; REVOKE ALL on "cities" from PUBLIC;
GRANT UPDATE,DELETE,SELECT,RULE on "cities" to "fane";
GRANT ALL on "cities" to "liviu";
CREATE FUNCTION "getcityprefix" (int4 ) RETURNS varchar AS 'select prefix from cities where id = $1 ' LANGUAGE 'SQL'; CREATE FUNCTION "getcityprefix" (int4 ) RETURNS varchar AS 'select prefix from cities where id = $1 ' LANGUAGE 'SQL';
COPY "pga_queries" FROM stdin; COPY "pga_queries" FROM stdin;
Query that can be saved as view S select * from phonebook where continent='usa' \N \N \N \N Query that can be saved as view S select * from phonebook where continent='usa' \N \N \N \N
......
...@@ -14,11 +14,11 @@ Download</h2> ...@@ -14,11 +14,11 @@ Download</h2>
<ul><a href="ftp://ftp.flex.ro/pub/pgaccess">ftp://ftp.flex.ro/pub/pgaccess</a> <ul><a href="ftp://ftp.flex.ro/pub/pgaccess">ftp://ftp.flex.ro/pub/pgaccess</a>
<ul> <ul>
<li> <li>
<a href="ftp://ftp.flex.ro/pub/pgaccess/pgaccess-0.98.tar.gz">Unix tar.gz <a href="ftp://ftp.flex.ro/pub/pgaccess/pgaccess-0.98.5.tar.gz">Unix tar.gz
file</a></li> file</a></li>
<li> <li>
<a href="ftp://ftp.flex.ro/pub/pgaccess/pgaccess-0.98.zip">Windows .zip <a href="ftp://ftp.flex.ro/pub/pgaccess/pgaccess-0.98.5.zip">Windows .zip
file</a></li> file</a></li>
</ul> </ul>
</ul> </ul>
...@@ -28,11 +28,11 @@ be : ...@@ -28,11 +28,11 @@ be :
<ul><a href="ftp://speedy.flex.ro/pub/pgaccess">ftp://speedy.flex.ro/pub/pgaccess</a> <ul><a href="ftp://speedy.flex.ro/pub/pgaccess">ftp://speedy.flex.ro/pub/pgaccess</a>
<ul> <ul>
<li> <li>
<a href="ftp://speedy.flex.ro/pub/pgaccess/pgaccess-0.98.tar.gz">Unix tar.gz <a href="ftp://speedy.flex.ro/pub/pgaccess/pgaccess-0.98.5.tar.gz">Unix tar.gz
file</a></li> file</a></li>
<li> <li>
<a href="ftp://speedy.flex.ro/pub/pgaccess/pgaccess-0.98.zip">Windows .zip <a href="ftp://speedy.flex.ro/pub/pgaccess/pgaccess-0.98.5.zip">Windows .zip
file</a></li> file</a></li>
</ul> </ul>
</ul> </ul>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <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]"> <meta name="GENERATOR" content="Mozilla/4.7 [en] (X11; I; Linux 2.2.12-20 i586) [Netscape]">
</head> </head>
<body bgcolor="#FEFEDF"> <body bgcolor="#FEFEDF">
...@@ -77,7 +77,32 @@ forget to send me a copy in order to include it into the standard distribution.< ...@@ -77,7 +77,32 @@ forget to send me a copy in order to include it into the standard distribution.<
name "namespace" while executing "namespace eval Mainlib</tt>&nbsp; ..."</b> name "namespace" while executing "namespace eval Mainlib</tt>&nbsp; ..."</b>
<blockquote>That means 100% that you have an older version of Tcl/Tk that <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> don't recognize namespaces command. Please upgrade to Tcl/Tk 8.0.x minimum</blockquote>
<b>9. When saving big forms with a lot of widgets and code inside, a big
error message appears, PgAccess crashes, cannot recover old form, pga_forms
table appears to be corrupted.</b>
<blockquote>Your form source is exceeding 8000 bytes. A PostgreSQL record
cannot hold more than 8 Kb and pga_forms table is corrupted. Sorry for
your work :-( , your old form cannot be recovered anymore if you don't
have a backup (dumped) database. Upgrade to PgAccess 0.98.3 that will prevent
saving of those big forms. In order to make your form sources smaller,
define some scripts for your form initialize routines or for other big
portions of code and call them from the form code with the command <tt>Scripts::execute
"Your space saving code script name"</tt></blockquote>
<p><br><b>10. I have a dual boot machine with Linux and Windows 9x installed.
PgAccess works fine from Linux but when trying to connect under Windows
it says something about wrong access rights to the same database. Tcl/Tk
version and PostgreSQL server version matches libpgtcl and libpq DLL's.</b>
<blockquote>Check your Windows TCP/IP configuration. If you configured
the Windows TCP/IP machine address to by dynamic allocated by the server
then it got another IP address, different from Linux. If you have host
based authentication then you have no rights for the database. Change the
Windows TCP/IP configuration and set up manually the same TCP/IP address
as from Linux installation or change the pg_hba.conf configuration file
from the server to allow access to the database from the whole domain not
from a single IP address.</blockquote>
<br>&nbsp;
<br>&nbsp; <br>&nbsp;
<br>&nbsp; <br>&nbsp;
<br>&nbsp; <br>&nbsp;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <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]"> <meta name="GENERATOR" content="Mozilla/4.72 [en] (X11; I; Linux 2.2.14 i586) [Netscape]">
</head> </head>
<body bgcolor="#FEFEDF"> <body bgcolor="#FEFEDF">
...@@ -14,14 +14,15 @@ PgAccess has been written by <a href="mailto:teo@flex.ro">Constantin Teodorescu< ...@@ -14,14 +14,15 @@ PgAccess has been written by <a href="mailto:teo@flex.ro">Constantin Teodorescu<
using Visual Tcl, the best tool for developing Tcl/Tk applications I've using Visual Tcl, the best tool for developing Tcl/Tk applications I've
ever seen. ever seen.
<p><b>Last version</b> <p><b>Last version</b>
<br>Last stable version is 0.98 , released on 29 August 1999. Read <a href="whatsnew.html">what's <br>Last stable version is 0.98.5 , released on 30 March 2000. Read <a href="whatsnew.html">what's
new</a> in 0.98. new</a> .
<p><b>Portability issues</b> <p><b>Portability issues</b>
<br>PgAccess is available for every platform where PostgreSQL was ported <br>PgAccess is available for every platform where PostgreSQL was ported
and where a Tcl/Tk package is available. PgAccess has been reported running and where a Tcl/Tk package is available. PgAccess has been reported running
on : on :
<br>- Linux <br>- Linux
<br>- FreeBSD <br>- FreeBSD
<br>- NetBSD
<br>- Solaris <br>- Solaris
<br>- HPUX <br>- HPUX
<br>- Irix <br>- Irix
......
...@@ -2,9 +2,47 @@ ...@@ -2,9 +2,47 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <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]"> <meta name="GENERATOR" content="Mozilla/4.72 [en] (X11; I; Linux 2.2.14 i586) [Netscape]">
</head> </head>
<body bgcolor="#FEFEDF"> <body bgcolor="#FEFEDF">
<b>30 March 2000 - PgAccess 0.98.5</b>
<ul>
<li>
added the "new database" feature</li>
<li>
added the czech and spanish message file</li>
</ul>
<b>29 January 2000 - PgAccess 0.98.4</b>
<ul>
<li>
fixed a problem granting or revoking rights from PUBLIC</li>
<li>
added the portuguese message file translation</li>
<li>
fixed the preferences window problems for big screens 1280x1024</li>
</ul>
<b>17 January 2000 - PgAccess 0.98.3</b>
<ul>
<li>
prevent saving of big forms that source size has more than 8000 bytes so
pga_forms table does not crash anymore, read <a href="faq.html">FAQ</a>
how to make your form sources smaller</li>
<li>
other very small bug fixes (less important)</li>
<li>
some windows can resize now up to 1280x1024 on big screens</li>
<li>
deutsh, russian and magyar message file available</li>
<li>
FAQ updates</li>
</ul>
<b>29 August 1999</b> - PgAccess 0.98 has been released! <b>29 August 1999</b> - PgAccess 0.98 has been released!
<ul> <ul>
<li> <li>
......
...@@ -419,6 +419,10 @@ global PgAcVar CurrentDB ...@@ -419,6 +419,10 @@ global PgAcVar CurrentDB
} }
lappend info [list $PgAcVar(fdobj,$i,class) $PgAcVar(fdobj,$i,name) $PgAcVar(fdobj,$i,coord) $PgAcVar(fdobj,$i,command) $PgAcVar(fdobj,$i,label) $PgAcVar(fdobj,$i,variable) $PgAcVar(fdobj,$i,value) $PgAcVar(fdobj,$i,relief) $PgAcVar(fdobj,$i,fcolor) $PgAcVar(fdobj,$i,bcolor) $PgAcVar(fdobj,$i,borderwidth) $wfont] lappend info [list $PgAcVar(fdobj,$i,class) $PgAcVar(fdobj,$i,name) $PgAcVar(fdobj,$i,coord) $PgAcVar(fdobj,$i,command) $PgAcVar(fdobj,$i,label) $PgAcVar(fdobj,$i,variable) $PgAcVar(fdobj,$i,value) $PgAcVar(fdobj,$i,relief) $PgAcVar(fdobj,$i,fcolor) $PgAcVar(fdobj,$i,bcolor) $PgAcVar(fdobj,$i,borderwidth) $wfont]
} }
if {[string length $info]>8000} {
tk_messageBox -title [intlmsg Error] -message [intlmsg "Form too big!\nSource size [string length $info] bytes\nCannot save !"]
return 0
}
sql_exec noquiet "delete from pga_forms where formname='$PgAcVar(fdvar,formtitle)'" sql_exec noquiet "delete from pga_forms where formname='$PgAcVar(fdvar,formtitle)'"
regsub -all "'" $info "''" info regsub -all "'" $info "''" info
sql_exec noquiet "insert into pga_forms values ('$PgAcVar(fdvar,formtitle)','$info')" sql_exec noquiet "insert into pga_forms values ('$PgAcVar(fdvar,formtitle)','$info')"
......
...@@ -57,7 +57,8 @@ global PgAcVar ...@@ -57,7 +57,8 @@ global PgAcVar
showError [intlmsg "You must supply the function language!"] showError [intlmsg "You must supply the function language!"]
} else { } else {
set funcbody [.pgaw:Function.fs.text1 get 1.0 end] set funcbody [.pgaw:Function.fs.text1 get 1.0 end]
regsub -all "\n" $funcbody " " funcbody # regsub -all "\n" $funcbody " " funcbody
regsub -all {'} $funcbody {''} funcbody
if {$PgAcVar(function,nametodrop) != ""} { if {$PgAcVar(function,nametodrop) != ""} {
if {! [sql_exec noquiet "drop function $PgAcVar(function,nametodrop)"]} { if {! [sql_exec noquiet "drop function $PgAcVar(function,nametodrop)"]} {
return return
......
...@@ -80,7 +80,7 @@ global PgAcVar ...@@ -80,7 +80,7 @@ global PgAcVar
set x [expr {($sw - 640)/2}] set x [expr {($sw - 640)/2}]
set y [expr {($sh - 480)/2}] set y [expr {($sh - 480)/2}]
wm geometry $base 640x480+$x+$y wm geometry $base 640x480+$x+$y
wm maxsize $base 1009 738 wm maxsize $base 1280 1024
wm minsize $base 1 1 wm minsize $base 1 1
wm overrideredirect $base 0 wm overrideredirect $base 0
wm resizable $base 1 1 wm resizable $base 1 1
......
...@@ -7,6 +7,8 @@ VACUUM opens every class in the database, cleans out records from rolled back tr ...@@ -7,6 +7,8 @@ VACUUM opens every class in the database, cleans out records from rolled back tr
We recommend that active production databases be cleaned nightly, in order to keep statistics relatively current. The VACUUM query may be executed at any time, however. In particular, after copying a large class into Postgres or after deleting a large number of records, it may be a good idea to issue a VACUUM query. This will update the system catalogs with the results of all recent changes, and allow the Postgres query optimizer to make better choices in planning user queries. We recommend that active production databases be cleaned nightly, in order to keep statistics relatively current. The VACUUM query may be executed at any time, however. In particular, after copying a large class into Postgres or after deleting a large number of records, it may be a good idea to issue a VACUUM query. This will update the system catalogs with the results of all recent changes, and allow the Postgres query optimizer to make better choices in planning user queries.
If the server crashes during a VACUUM command, chances are it will leave a lock file hanging around. Attempts to re-run the VACUUM command result in an error message about the creation of a lock file. If you are sure VACUUM is not running, remove the pg_vlock file in your database directory (i.e. PGDATA/base/dbname/pg_vlock).
" {} "Synopsis" {bold} " " {} "Synopsis" {bold} "
VACUUM \[ VERBOSE \] \[ ANALYZE \] \[ table \] VACUUM \[ VERBOSE \] \[ ANALYZE \] \[ table \]
VACUUM \[ VERBOSE \] ANALYZE \[ table \[ (column \[, ...\] ) \] \] VACUUM \[ VERBOSE \] ANALYZE \[ table \[ (column \[, ...\] ) \] \]
......
This diff is collapsed.
...@@ -48,7 +48,7 @@ array set Messages { ...@@ -48,7 +48,7 @@ array set Messages {
"Last value" "Ultima valoare" "Last value" "Ultima valoare"
"Preferences" "Preferine" "Preferences" "Opiuni"
"View '%s' already exists!\nOverwrite ?" "Vederea '%s' mai exista!\nO suprainscriem ?" "View '%s' already exists!\nOverwrite ?" "Vederea '%s' mai exista!\nO suprainscriem ?"
...@@ -282,7 +282,7 @@ array set Messages { ...@@ -282,7 +282,7 @@ array set Messages {
"Save" "Salveaz" "Save" "Salveaz"
"Exit" "Terminare" "Exit" "Termin"
"Inherits" "Strmoi" "Inherits" "Strmoi"
...@@ -306,7 +306,7 @@ array set Messages { ...@@ -306,7 +306,7 @@ array set Messages {
"There is another field with the same name: '%s'!\n\nReplace it ?" "Mai exista un cimp cu acelasi nume: '%s'!\n\nIl inlocuim cu descrierea noua?" "There is another field with the same name: '%s'!\n\nReplace it ?" "Mai exista un cimp cu acelasi nume: '%s'!\n\nIl inlocuim cu descrierea noua?"
"Contents" "Coninut" "Contents" "Cuprins"
"Views" "Vederi" "Views" "Vederi"
...@@ -478,7 +478,7 @@ array set Messages { ...@@ -478,7 +478,7 @@ array set Messages {
"primary key" "cheie primar" "primary key" "cheie primar"
"Back" "Inapoi" "Back" "napoi"
"Columns" "Coloane" "Columns" "Coloane"
......
...@@ -222,6 +222,7 @@ global PgAcVar CurrentDB ...@@ -222,6 +222,7 @@ global PgAcVar CurrentDB
} }
set PgAcVar(Old_Object_Name) $temp set PgAcVar(Old_Object_Name) $temp
Window show .pgaw:RenameObject Window show .pgaw:RenameObject
wm transient .pgaw:RenameObject .pgaw:Main
} }
...@@ -472,7 +473,7 @@ global PgAcVar ...@@ -472,7 +473,7 @@ global PgAcVar
-background #efefef -cursor left_ptr -background #efefef -cursor left_ptr
wm focusmodel $base passive wm focusmodel $base passive
wm geometry $base 332x390+96+172 wm geometry $base 332x390+96+172
wm maxsize $base 1009 738 wm maxsize $base 1280 1024
wm minsize $base 1 1 wm minsize $base 1 1
wm overrideredirect $base 0 wm overrideredirect $base 0
wm resizable $base 0 0 wm resizable $base 0 0
...@@ -506,6 +507,8 @@ global PgAcVar ...@@ -506,6 +507,8 @@ global PgAcVar
menu $base.fm.mndb.01 \ menu $base.fm.mndb.01 \
-borderwidth 1 -font $PgAcVar(pref,font_normal) \ -borderwidth 1 -font $PgAcVar(pref,font_normal) \
-tearoff 0 -tearoff 0
$base.fm.mndb.01 add command \
-command {Window show .pgaw:NewDatabase ; wm transient .pgaw:NewDatabase .pgaw:Main} -label [intlmsg New]
$base.fm.mndb.01 add command \ $base.fm.mndb.01 add command \
-command { -command {
Window show .pgaw:OpenDB Window show .pgaw:OpenDB
...@@ -610,7 +613,7 @@ proc vTclWindow.pgaw:ImportExport {base} { ...@@ -610,7 +613,7 @@ proc vTclWindow.pgaw:ImportExport {base} {
toplevel $base -class Toplevel toplevel $base -class Toplevel
wm focusmodel $base passive wm focusmodel $base passive
wm geometry $base 287x151+259+304 wm geometry $base 287x151+259+304
wm maxsize $base 1009 738 wm maxsize $base 1280 1024
wm minsize $base 1 1 wm minsize $base 1 1
wm overrideredirect $base 0 wm overrideredirect $base 0
wm resizable $base 0 0 wm resizable $base 0 0
...@@ -674,7 +677,7 @@ proc vTclWindow.pgaw:RenameObject {base} { ...@@ -674,7 +677,7 @@ proc vTclWindow.pgaw:RenameObject {base} {
toplevel $base -class Toplevel toplevel $base -class Toplevel
wm focusmodel $base passive wm focusmodel $base passive
wm geometry $base 272x105+294+262 wm geometry $base 272x105+294+262
wm maxsize $base 1009 738 wm maxsize $base 1280 1024
wm minsize $base 1 1 wm minsize $base 1 1
wm overrideredirect $base 0 wm overrideredirect $base 0
wm resizable $base 0 0 wm resizable $base 0 0
...@@ -749,6 +752,36 @@ proc vTclWindow.pgaw:RenameObject {base} { ...@@ -749,6 +752,36 @@ proc vTclWindow.pgaw:RenameObject {base} {
place $base.b2 -x 155 -y 65 -width 80 -anchor nw -bordermode ignore place $base.b2 -x 155 -y 65 -width 80 -anchor nw -bordermode ignore
} }
proc vTclWindow.pgaw:NewDatabase {base} {
if {$base == ""} {
set base .pgaw:NewDatabase
}
if {[winfo exists $base]} {
wm deiconify $base; return
}
toplevel $base -class Toplevel
wm focusmodel $base passive
wm geometry $base 272x105+294+262
wm maxsize $base 1280 1024
wm minsize $base 1 1
wm overrideredirect $base 0
wm resizable $base 0 0
wm title $base [intlmsg "New"]
label $base.l1 -borderwidth 0 -text [intlmsg {Name}]
entry $base.e1 -background #fefefe -borderwidth 1 -textvariable PgAcVar(New_Database_Name)
button $base.b1 -borderwidth 1 -command {
set retval [sql_exec noquiet "create database $PgAcVar(New_Database_Name)"]
if {$retval} {
Window destroy .pgaw:NewDatabase
}
} -text [intlmsg Create]
button $base.b2 -borderwidth 1 -command {Window destroy .pgaw:NewDatabase} -text [intlmsg Cancel]
place $base.l1 -x 15 -y 28 -anchor nw -bordermode ignore
place $base.e1 -x 100 -y 25 -anchor nw -bordermode ignore
place $base.b1 -x 55 -y 65 -width 80 -anchor nw -bordermode ignore
place $base.b2 -x 155 -y 65 -width 80 -anchor nw -bordermode ignore
}
proc vTclWindow.pgaw:GetParameter {base} { proc vTclWindow.pgaw:GetParameter {base} {
if {$base == ""} { if {$base == ""} {
...@@ -764,7 +797,7 @@ proc vTclWindow.pgaw:GetParameter {base} { ...@@ -764,7 +797,7 @@ proc vTclWindow.pgaw:GetParameter {base} {
set x [expr ($sw - 297)/2] set x [expr ($sw - 297)/2]
set y [expr ($sh - 98)/2] set y [expr ($sh - 98)/2]
wm geometry $base 297x98+$x+$y wm geometry $base 297x98+$x+$y
wm maxsize $base 1009 738 wm maxsize $base 1280 1024
wm minsize $base 1 1 wm minsize $base 1 1
wm overrideredirect $base 0 wm overrideredirect $base 0
wm resizable $base 0 0 wm resizable $base 0 0
...@@ -811,7 +844,7 @@ proc vTclWindow.pgaw:SQLWindow {base} { ...@@ -811,7 +844,7 @@ proc vTclWindow.pgaw:SQLWindow {base} {
toplevel $base -class Toplevel toplevel $base -class Toplevel
wm focusmodel $base passive wm focusmodel $base passive
wm geometry $base 551x408+192+169 wm geometry $base 551x408+192+169
wm maxsize $base 1009 738 wm maxsize $base 1280 1024
wm minsize $base 1 1 wm minsize $base 1 1
wm overrideredirect $base 0 wm overrideredirect $base 0
wm resizable $base 1 1 wm resizable $base 1 1
...@@ -863,14 +896,14 @@ proc vTclWindow.pgaw:About {base} { ...@@ -863,14 +896,14 @@ proc vTclWindow.pgaw:About {base} {
toplevel $base -class Toplevel toplevel $base -class Toplevel
wm focusmodel $base passive wm focusmodel $base passive
wm geometry $base 471x177+168+243 wm geometry $base 471x177+168+243
wm maxsize $base 1009 738 wm maxsize $base 1280 1024
wm minsize $base 1 1 wm minsize $base 1 1
wm overrideredirect $base 0 wm overrideredirect $base 0
wm resizable $base 1 1 wm resizable $base 1 1
wm title $base [intlmsg "About"] wm title $base [intlmsg "About"]
label $base.l1 -borderwidth 3 -font -Adobe-Helvetica-Bold-R-Normal-*-*-180-*-*-*-*-* -relief ridge -text PgAccess label $base.l1 -borderwidth 3 -font -Adobe-Helvetica-Bold-R-Normal-*-*-180-*-*-*-*-* -relief ridge -text PgAccess
label $base.l2 -relief groove -text [intlmsg "A Tcl/Tk interface to\nPostgreSQL\nby Constantin Teodorescu"] label $base.l2 -relief groove -text [intlmsg "A Tcl/Tk interface to\nPostgreSQL\nby Constantin Teodorescu"]
label $base.l3 -borderwidth 0 -relief sunken -text {v 0.98} label $base.l3 -borderwidth 0 -relief sunken -text {v 0.98.5}
label $base.l4 -relief groove -text "[intlmsg {You will always get the latest version at:}] label $base.l4 -relief groove -text "[intlmsg {You will always get the latest version at:}]
http://www.flex.ro/pgaccess http://www.flex.ro/pgaccess
...@@ -893,7 +926,7 @@ proc vTclWindow.pgaw:OpenDB {base} { ...@@ -893,7 +926,7 @@ proc vTclWindow.pgaw:OpenDB {base} {
toplevel $base -class Toplevel toplevel $base -class Toplevel
wm focusmodel $base passive wm focusmodel $base passive
wm geometry $base 283x172+119+210 wm geometry $base 283x172+119+210
wm maxsize $base 1009 738 wm maxsize $base 1280 1024
wm minsize $base 1 1 wm minsize $base 1 1
wm overrideredirect $base 0 wm overrideredirect $base 0
wm resizable $base 0 0 wm resizable $base 0 0
......
...@@ -121,11 +121,11 @@ proc vTclWindow.pgaw:Preferences {base} { ...@@ -121,11 +121,11 @@ proc vTclWindow.pgaw:Preferences {base} {
} }
toplevel $base -class Toplevel toplevel $base -class Toplevel
wm focusmodel $base passive wm focusmodel $base passive
wm geometry $base 450x360+100+213 wm geometry $base 500x400+100+113
wm maxsize $base 1009 738 wm maxsize $base 1009 738
wm minsize $base 1 1 wm minsize $base 1 1
wm overrideredirect $base 0 wm overrideredirect $base 0
wm resizable $base 0 0 wm resizable $base 1 1
wm deiconify $base wm deiconify $base
wm title $base [intlmsg "Preferences"] wm title $base [intlmsg "Preferences"]
bind $base <Key-Escape> "Window destroy .pgaw:Preferences" bind $base <Key-Escape> "Window destroy .pgaw:Preferences"
...@@ -190,7 +190,7 @@ proc vTclWindow.pgaw:Preferences {base} { ...@@ -190,7 +190,7 @@ proc vTclWindow.pgaw:Preferences {base} {
frame $base.fpl.flb \ frame $base.fpl.flb \
-height 75 -relief sunken -width 125 -height 75 -relief sunken -width 125
listbox $base.fpl.flb.llb \ listbox $base.fpl.flb.llb \
-borderwidth 1 -height 6 -yscrollcommand {.pgaw:Preferences.fpl.flb.vsb set} -borderwidth 1 -height 3 -yscrollcommand {.pgaw:Preferences.fpl.flb.vsb set}
scrollbar $base.fpl.flb.vsb \ scrollbar $base.fpl.flb.vsb \
-borderwidth 1 -command {.pgaw:Preferences.fpl.flb.llb yview} -orient vert -borderwidth 1 -command {.pgaw:Preferences.fpl.flb.llb yview} -orient vert
frame $base.fb \ frame $base.fb \
...@@ -254,15 +254,15 @@ tk_messageBox -title [intlmsg Warning] -parent .pgaw:Main -message [intlmsg "Cha ...@@ -254,15 +254,15 @@ tk_messageBox -title [intlmsg Warning] -parent .pgaw:Main -message [intlmsg "Cha
pack $base.fal.st \ pack $base.fal.st \
-in .pgaw:Preferences.fal -anchor center -expand 0 -fill x -side top -anchor w -in .pgaw:Preferences.fal -anchor center -expand 0 -fill x -side top -anchor w
pack $base.fpl \ pack $base.fpl \
-in .pgaw:Preferences -anchor center -expand 0 -fill x -side top -in .pgaw:Preferences -anchor center -expand 1 -fill both -side top
pack $base.fpl.lt \ pack $base.fpl.lt \
-in .pgaw:Preferences.fpl -anchor center -expand 0 -fill none -side top -in .pgaw:Preferences.fpl -anchor center -expand 0 -fill none -side top
pack $base.fpl.flb \ pack $base.fpl.flb \
-in .pgaw:Preferences.fpl -anchor center -expand 0 -fill none -side top -in .pgaw:Preferences.fpl -anchor center -expand 1 -fill y -side top
pack $base.fpl.flb.llb \ pack $base.fpl.flb.llb \
-in .pgaw:Preferences.fpl.flb -anchor center -expand 0 -fill none -side left -in .pgaw:Preferences.fpl.flb -anchor center -expand 1 -fill y -side left
pack $base.fpl.flb.vsb \ pack $base.fpl.flb.vsb \
-in .pgaw:Preferences.fpl.flb -anchor center -expand 0 -fill y -side right -in .pgaw:Preferences.fpl.flb -anchor center -expand 1 -fill y -side right
pack $base.fb \ pack $base.fb \
-in .pgaw:Preferences -anchor center -expand 0 -fill none -side bottom -in .pgaw:Preferences -anchor center -expand 0 -fill none -side bottom
grid $base.fb.btnsave \ grid $base.fb.btnsave \
......
...@@ -185,7 +185,7 @@ global PgAcVar ...@@ -185,7 +185,7 @@ global PgAcVar
toplevel $base -class Toplevel toplevel $base -class Toplevel
wm focusmodel $base passive wm focusmodel $base passive
wm geometry $base 542x364+150+150 wm geometry $base 542x364+150+150
wm maxsize $base 1009 738 wm maxsize $base 1280 1024
wm minsize $base 1 1 wm minsize $base 1 1
wm overrideredirect $base 0 wm overrideredirect $base 0
wm resizable $base 0 0 wm resizable $base 0 0
......
...@@ -368,7 +368,7 @@ global PgAcVar ...@@ -368,7 +368,7 @@ global PgAcVar
toplevel $base -class Toplevel toplevel $base -class Toplevel
wm focusmodel $base passive wm focusmodel $base passive
wm geometry $base 652x426+96+120 wm geometry $base 652x426+96+120
wm maxsize $base 1009 738 wm maxsize $base 1280 1024
wm minsize $base 1 1 wm minsize $base 1 1
wm overrideredirect $base 0 wm overrideredirect $base 0
wm resizable $base 0 0 wm resizable $base 0 0
...@@ -562,7 +562,7 @@ proc vTclWindow.pgaw:ReportPreview {base} { ...@@ -562,7 +562,7 @@ proc vTclWindow.pgaw:ReportPreview {base} {
toplevel $base -class Toplevel toplevel $base -class Toplevel
wm focusmodel $base passive wm focusmodel $base passive
wm geometry $base 495x500+230+50 wm geometry $base 495x500+230+50
wm maxsize $base 1009 738 wm maxsize $base 1280 1024
wm minsize $base 1 1 wm minsize $base 1 1
wm overrideredirect $base 0 wm overrideredirect $base 0
wm resizable $base 1 1 wm resizable $base 1 1
......
...@@ -482,7 +482,7 @@ global PgAcVar ...@@ -482,7 +482,7 @@ global PgAcVar
toplevel $base -class Toplevel toplevel $base -class Toplevel
wm focusmodel $base passive wm focusmodel $base passive
wm geometry $base 759x530+10+13 wm geometry $base 759x530+10+13
wm maxsize $base 1009 738 wm maxsize $base 1280 1024
wm minsize $base 1 1 wm minsize $base 1 1
wm overrideredirect $base 0 wm overrideredirect $base 0
wm resizable $base 1 1 wm resizable $base 1 1
......
...@@ -148,18 +148,23 @@ global PgAcVar ...@@ -148,18 +148,23 @@ global PgAcVar
showError [intlmsg "User without name?"] showError [intlmsg "User without name?"]
return return
} }
sql_exec noquiet "revoke all on \"$PgAcVar(tblinfo,tablename)\" from $PgAcVar(permission,username)" if {$PgAcVar(permission,username)=="PUBLIC"} {
set usrname PUBLIC
} else {
set usrname "\"$PgAcVar(permission,username)\""
}
sql_exec noquiet "revoke all on \"$PgAcVar(tblinfo,tablename)\" from $usrname"
if {$PgAcVar(permission,select)} { if {$PgAcVar(permission,select)} {
sql_exec noquiet "GRANT SELECT on \"$PgAcVar(tblinfo,tablename)\" to $PgAcVar(permission,username)" sql_exec noquiet "GRANT SELECT on \"$PgAcVar(tblinfo,tablename)\" to $usrname"
} }
if {$PgAcVar(permission,insert)} { if {$PgAcVar(permission,insert)} {
sql_exec noquiet "GRANT INSERT on \"$PgAcVar(tblinfo,tablename)\" to $PgAcVar(permission,username)" sql_exec noquiet "GRANT INSERT on \"$PgAcVar(tblinfo,tablename)\" to $usrname"
} }
if {$PgAcVar(permission,update)} { if {$PgAcVar(permission,update)} {
sql_exec noquiet "GRANT UPDATE on \"$PgAcVar(tblinfo,tablename)\" to $PgAcVar(permission,username)" sql_exec noquiet "GRANT UPDATE on \"$PgAcVar(tblinfo,tablename)\" to $usrname"
} }
if {$PgAcVar(permission,rule)} { if {$PgAcVar(permission,rule)} {
sql_exec noquiet "GRANT RULE on \"$PgAcVar(tblinfo,tablename)\" to $PgAcVar(permission,username)" sql_exec noquiet "GRANT RULE on \"$PgAcVar(tblinfo,tablename)\" to $usrname"
} }
refreshTableInformation refreshTableInformation
} }
...@@ -939,7 +944,7 @@ global PgAcVar ...@@ -939,7 +944,7 @@ global PgAcVar
toplevel $base -class Toplevel toplevel $base -class Toplevel
wm focusmodel $base passive wm focusmodel $base passive
wm geometry $base 650x400 wm geometry $base 650x400
wm maxsize $base 1009 738 wm maxsize $base 1280 1024
wm minsize $base 650 400 wm minsize $base 650 400
wm overrideredirect $base 0 wm overrideredirect $base 0
wm resizable $base 1 1 wm resizable $base 1 1
...@@ -1242,7 +1247,7 @@ global PgAcVar ...@@ -1242,7 +1247,7 @@ global PgAcVar
toplevel $base -class Toplevel toplevel $base -class Toplevel
wm focusmodel $base passive wm focusmodel $base passive
wm geometry $base 634x392+78+181 wm geometry $base 634x392+78+181
wm maxsize $base 1009 738 wm maxsize $base 1280 1024
wm minsize $base 1 1 wm minsize $base 1 1
wm overrideredirect $base 0 wm overrideredirect $base 0
wm resizable $base 0 0 wm resizable $base 0 0
...@@ -1513,7 +1518,7 @@ global PgAcVar ...@@ -1513,7 +1518,7 @@ global PgAcVar
-background #c7c3c7 -background #c7c3c7
wm focusmodel $base passive wm focusmodel $base passive
wm geometry $base 522x398+152+135 wm geometry $base 522x398+152+135
wm maxsize $base 1009 738 wm maxsize $base 1280 1024
wm minsize $base 1 1 wm minsize $base 1 1
wm overrideredirect $base 0 wm overrideredirect $base 0
wm resizable $base 0 0 wm resizable $base 0 0
...@@ -1929,7 +1934,7 @@ proc vTclWindow.pgaw:AddIndex {base} { ...@@ -1929,7 +1934,7 @@ proc vTclWindow.pgaw:AddIndex {base} {
toplevel $base -class Toplevel toplevel $base -class Toplevel
wm focusmodel $base passive wm focusmodel $base passive
wm geometry $base 334x203+265+266 wm geometry $base 334x203+265+266
wm maxsize $base 1009 738 wm maxsize $base 1280 1024
wm minsize $base 1 1 wm minsize $base 1 1
wm overrideredirect $base 0 wm overrideredirect $base 0
wm resizable $base 0 0 wm resizable $base 0 0
...@@ -1998,7 +2003,7 @@ proc vTclWindow.pgaw:AddField {base} { ...@@ -1998,7 +2003,7 @@ proc vTclWindow.pgaw:AddField {base} {
toplevel $base -class Toplevel toplevel $base -class Toplevel
wm focusmodel $base passive wm focusmodel $base passive
wm geometry $base 302x114+195+175 wm geometry $base 302x114+195+175
wm maxsize $base 1009 738 wm maxsize $base 1280 1024
wm minsize $base 1 1 wm minsize $base 1 1
wm overrideredirect $base 0 wm overrideredirect $base 0
wm resizable $base 0 0 wm resizable $base 0 0
...@@ -2054,7 +2059,7 @@ proc vTclWindow.pgaw:RenameField {base} { ...@@ -2054,7 +2059,7 @@ proc vTclWindow.pgaw:RenameField {base} {
toplevel $base -class Toplevel toplevel $base -class Toplevel
wm focusmodel $base passive wm focusmodel $base passive
wm geometry $base 215x75+258+213 wm geometry $base 215x75+258+213
wm maxsize $base 1009 738 wm maxsize $base 1280 1024
wm minsize $base 1 1 wm minsize $base 1 1
wm overrideredirect $base 0 wm overrideredirect $base 0
wm resizable $base 0 0 wm resizable $base 0 0
...@@ -2097,7 +2102,7 @@ proc vTclWindow.pgaw:Permissions {base} { ...@@ -2097,7 +2102,7 @@ proc vTclWindow.pgaw:Permissions {base} {
toplevel $base -class Toplevel toplevel $base -class Toplevel
wm focusmodel $base passive wm focusmodel $base passive
wm geometry $base 273x147+256+266 wm geometry $base 273x147+256+266
wm maxsize $base 1009 738 wm maxsize $base 1280 1024
wm minsize $base 1 1 wm minsize $base 1 1
wm overrideredirect $base 0 wm overrideredirect $base 0
wm resizable $base 0 0 wm resizable $base 0 0
......
...@@ -714,7 +714,7 @@ global PgAcVar ...@@ -714,7 +714,7 @@ global PgAcVar
toplevel $base -class Toplevel toplevel $base -class Toplevel
wm focusmodel $base passive wm focusmodel $base passive
wm geometry $base 759x530+10+13 wm geometry $base 759x530+10+13
wm maxsize $base 1009 738 wm maxsize $base 1280 1024
wm minsize $base 1 1 wm minsize $base 1 1
wm overrideredirect $base 0 wm overrideredirect $base 0
wm resizable $base 1 1 wm resizable $base 1 1
......
#!/bin/sh #!/bin/sh
PATH_TO_WISH=__wish__ PATH_TO_WISH=/usr/bin/wish
PGACCESS_HOME=__POSTGRESDIR__/pgaccess PGACCESS_HOME=/usr/local/pgaccess
export PATH_TO_WISH export PATH_TO_WISH
export PGACCESS_HOME export PGACCESS_HOME
exec $PATH_TO_WISH $PGACCESS_HOME/main.tcl "$@" exec ${PATH_TO_WISH} ${PGACCESS_HOME}/main.tcl "$@"
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