Commit 953002f1 authored by Bruce Momjian's avatar Bruce Momjian

Properly compute max sys oid for 7.0 and 7.1.

parent 4d84b7a1
...@@ -105,14 +105,20 @@ global CurrentDB ...@@ -105,14 +105,20 @@ global CurrentDB
proc {cmd_Functions} {} { proc {cmd_Functions} {} {
global CurrentDB global PgAcVar CurrentDB
set maxim 16384 set maxim 16384
setCursor CLOCK setCursor CLOCK
set dbname $PgAcVar(opendb,dbname)
if [catch {wpg_select $CurrentDB "select datlastsysoid from pg_database where datname='$dbname'" rec {
set maxim $rec(datlastsysoid)
}
}] {
catch { catch {
wpg_select $CurrentDB "select oid from pg_database where datname='template1'" rec { wpg_select $CurrentDB "select oid from pg_database where datname='template1'" rec {
set maxim $rec(oid) set maxim $rec(oid)
} }
} }
}
.pgaw:Main.lb delete 0 end .pgaw:Main.lb delete 0 end
catch { catch {
wpg_select $CurrentDB "select proname from pg_proc where oid>$maxim order by proname" rec { wpg_select $CurrentDB "select proname from pg_proc where oid>$maxim order by proname" rec {
......
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