<METANAME="GENERATOR"CONTENT="Mozilla/3.04Gold (X11; I; Linux 2.0.33 i586) [Netscape]">
</HEAD>
<BODYBGCOLOR="#FFFFFF">
<H1>
PgAccess - a database management tool for <AHREF="http://www.postgreSQL.org">PostgreSQL</A></H1>
<H1>PgAccess - a free database management tool for <AHREF="http://www.postgreSQL.org">PostgreSQL</A></H1>
<HR>
<P>
<HR></P>
<P>This program is protected by the following <AHREF="copyright.html">copyright</A>
<LI>
<AHREF="pgaccess-0.88.tar.gz">Download the last version of PgAccess (press
shift and click this link)</A>.</LI>
<LI><AHREF="pgaccess-0.90.tar.gz">Download the last version of PgAccess
(press shift and click this link)</A>.</LI>
<CENTER><P>Latest version of PgAccess is 0.90 , 18 September 1998 ! <BR>
<BR>
<B><FONTCOLOR="#FF0000">NEW * NEW * NEW *</FONT></B><B><FONTCOLOR="#FF0000">
NEW *</FONT></B> ==== ><B><FONTSIZE=+1>QUERY PARAMETERS</FONT></B>
(see section Queries below)<BR>
<BR>
Precompiled libpgtcl and libpq binaries for i386 are <AHREF="ftp://ftp.flex.ro/pub/pgaccess">here
</A>!!! <BR>
</P></CENTER>
<P>Latest version of PgAccess is 0.88 , 7 June 1998 !
<BR><br>
<fontcolor='red'><b>NEW * NEW * NEW *</b></font> Precompiled libpgtcl and libpq binaries for i386 are <ahref='ftp://ftp.flex.ro/pub/pgaccess'> here </a>!!!
if {[tk_messageBox -title "FINAL WARNING" -message "You are going to delete table:\n\n$objtodelete\n\nProceed ?" -type yesno -default no]=="yes"}{
sql_exec noquiet "drop table $objtodelete"
sql_exec noquiet "drop table \"$objtodelete\""
sql_exec quiet "delete from pga_layout where tablename='$objtodelete'"
cmd_Tables
}
...
...
@@ -1193,7 +1193,7 @@ if {$mw(row_edited)==$mw(last_rownum)} {
set msg "Updating record ..."
after 1000 {set msg ""}
regsub -all ' $fldval \\' sqlfldval
set retval [sql_exec noquiet "update $tablename set $fld='$sqlfldval' where oid=$oid"]
set retval [sql_exec noquiet "update \"$tablename\" set $fld='$sqlfldval' where oid=$oid"]
}
cursor_arrow .mw
if {!$retval}{
...
...
@@ -1267,7 +1267,7 @@ if {$mw(newrec_fields)==""} {return 1}
set msg "Saving new record ..."
after 1000 {set msg ""}
set retval [catch {
set sqlcmd "insert into $tablename ([join $mw(newrec_fields) ,]) values ([join $mw(newrec_values) ,])"
set sqlcmd "insert into \"$tablename\" ([join $mw(newrec_fields) ,]) values ([join $mw(newrec_values) ,])"
set pgres [pg_exec $dbc $sqlcmd]
} errmsg]
if {$retval}{
...
...
@@ -1596,13 +1596,13 @@ if {$how=="design"} {
.qb.text1 insert end $qcmd
} else {
if {$qtype=="S"} then {
set mw(query)[subst $qcmd]
set mw(updatable) 0
set mw(isaquery) 1
Window show .mw
wm title .mw "Query result: $queryname"
mw_load_layout $queryname
set mw(query) $qcmd
set mw(updatable) 0
set mw(isaquery) 1
mw_select_records $qcmd
mw_select_records $mw(query)
} else {
set answ [tk_messageBox -title Warning -type yesno -message "This query is an action query!\n\n[string range $qcmd 0 30] ...\n\nDo you want to execute it?"]
if {$answ}{
...
...
@@ -1646,7 +1646,7 @@ set filter {}
Window show .mw
set tablename $objname
mw_load_layout $objname
set mw(query)"select oid,$tablename.* from $objname"
set mw(query)"select oid,\"$tablename\".* from \"$objname\""
set mw(updatable) 1
set mw(isaquery) 0
mw_select_records $mw(query)
...
...
@@ -1665,6 +1665,23 @@ mw_load_layout $vn
mw_select_records $mw(query)
}
proc {parameter}{msg}{
global gpw
Window show .gpw
focus .gpw.e1
set gpw(var)""
set gpw(flag) 0
set gpw(msg) $msg
bind .gpw <Destroy> "set gpw(flag) 1"
grab .gpw
tkwait variable gpw(flag)
if {$gpw(result)}{
return $gpw(var)
} else {
return ""
}
}
proc {ql_add_new_table}{}{
global qlvar dbc
...
...
@@ -1704,7 +1721,7 @@ set tables {}
for {set i 0}{$i<$qlvar(ntables)}{incr i}{
set thename {}
catch {set thename $qlvar(tablename$i)}
if {$thename!=""}{lappend tables "$qlvar(tablename$i)$qlvar(tablealias$i)"}
if {$thename!=""}{lappend tables "\"$qlvar(tablename$i)\"$qlvar(tablealias$i)"}
}
set sqlcmd "$sqlcmd from [join $tables ,] "
set sup1 {}
...
...
@@ -1767,10 +1784,10 @@ if {[ql_get_tag_info $obj res]=="f"} {
# Is object a table ?
set tablealias [ql_get_tag_info $obj tab]
set tablename $qlvar(ali_$tablealias)
if {$tablename==""} return
if {"$tablename"==""} return
if {[tk_messageBox -title WARNING -icon question -message "Remove table $tablename from query ?" -type yesno -default no]=="no"} return
for {set i [expr [llength $qlvar(restables)]-1]}{$i>=0}{incr i -1}{
if {$tablename==[lindex $qlvar(restables) $i]}{
if {"$tablename"==[lindex $qlvar(restables) $i]}{
set qlvar(resfields)[lreplace $qlvar(resfields) $i $i]
set qlvar(restables)[lreplace $qlvar(restables) $i $i]
set qlvar(rescriteria)[lreplace $qlvar(rescriteria) $i $i]
...
...
@@ -2004,7 +2021,7 @@ set allbox [.ql.c bbox rect]