1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Properly compute max sys oid for 7.0 and 7.1.

This commit is contained in:
Bruce Momjian
2001-05-30 18:08:24 +00:00
parent 4d84b7a10f
commit 953002f1b3

View File

@ -105,12 +105,18 @@ global CurrentDB
proc {cmd_Functions} {} { proc {cmd_Functions} {} {
global CurrentDB global PgAcVar CurrentDB
set maxim 16384 set maxim 16384
setCursor CLOCK setCursor CLOCK
catch { set dbname $PgAcVar(opendb,dbname)
wpg_select $CurrentDB "select oid from pg_database where datname='template1'" rec { if [catch {wpg_select $CurrentDB "select datlastsysoid from pg_database where datname='$dbname'" rec {
set maxim $rec(oid) set maxim $rec(datlastsysoid)
}
}] {
catch {
wpg_select $CurrentDB "select oid from pg_database where datname='template1'" rec {
set maxim $rec(oid)
}
} }
} }
.pgaw:Main.lb delete 0 end .pgaw:Main.lb delete 0 end