@@ -13,12 +13,13 @@ PgAccess - a database management tool for <A HREF="http://www.postgreSQL.org">Po
<P>This program is protected by the following <AHREF="copyright.html">copyright</A>
<LI>
<AHREF="pgaccess-0.86.tar.gz">Download the last version of PgAccess (press
<AHREF="pgaccess-0.88.tar.gz">Download the last version of PgAccess (press
shift and click this link)</A>.</LI>
<P>Latest version of PgAccess is 0.86 , 29 March 1998 !
<BR>
<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>!!!
set pgres [pg_exec $dbc "select relname from pg_class where relname='$table'"]
if {[pg_result $pgres -numTuples]==0}{
pg_result $pgres -clear
sql_exec quiet "create table $table ($structure)"
...
...
@@ -2430,22 +2444,21 @@ Window show .tiw
set tiw(isunique){}
set tiw(isclustered){}
set tiw(indexfields){}
pg_select $dbc "select attnum,attname,typname,attlen,usename,pg_class.oid from pg_class,pg_user,pg_attribute,pg_type where (pg_class.relname='$tiw(tablename)') and (pg_class.oid=pg_attribute.attrelid) and (pg_class.relowner=pg_user.usesysid) and (pg_attribute.atttypid=pg_type.oid) order by attnum" rec {
set fsize $rec(attlen)
set ftype $rec(typname)
if {$ftype=="varchar"}{
incr fsize -4
}
if {$ftype=="bpchar"}{
incr fsize -4
}
if {$ftype=="text"}{
set fsize ""
}
if {$rec(attnum)>0}{.tiw.lb insert end [format "%-33s %-14s %-4s" $rec(attname) $ftype $fsize]}
set tiw(owner) $rec(usename)
set tiw(tableoid) $rec(oid)
set tiw(f$rec(attnum)) $rec(attname)
pg_select $dbc "select attnum,attname,typname,attlen,atttypmod,usename,pg_class.oid from pg_class,pg_user,pg_attribute,pg_type where (pg_class.relname='$tiw(tablename)') and (pg_class.oid=pg_attribute.attrelid) and (pg_class.relowner=pg_user.usesysid) and (pg_attribute.atttypid=pg_type.oid) order by attnum" rec {
set fsize $rec(attlen)
set fsize1 $rec(atttypmod)
set ftype $rec(typname)
if { $fsize=="-1" && $fsize1!="-1"}{
set fsize $rec(atttypmod)
incr fsize -4
}
if { $fsize1=="-1" && $fsize=="-1"}{
set fsize ""
}
if {$rec(attnum)>0}{.tiw.lb insert end [format "%-33s %-14s %-4s" $rec(attname) $ftype $fsize]}
set tiw(owner) $rec(usename)
set tiw(tableoid) $rec(oid)
set tiw(f$rec(attnum)) $rec(attname)
}
set tiw(indexlist){}
pg_select $dbc "select oid,indexrelid from pg_index where (pg_class.relname='$tiw(tablename)') and (pg_class.oid=pg_index.indrelid)" rec {
...
...
@@ -2540,10 +2553,12 @@ if {$retval} {
}
proc {main}{argc argv}{
global pref newdbname newpport newhost dbc
global pref newdbname newpport newhost newusername newpassword dbc