Skip to content
Snippets Groups Projects
Commit 953002f1 authored by Bruce Momjian's avatar Bruce Momjian
Browse files

Properly compute max sys oid for 7.0 and 7.1.

parent 4d84b7a1
No related branches found
No related tags found
No related merge requests found
......@@ -105,12 +105,18 @@ global CurrentDB
proc {cmd_Functions} {} {
global CurrentDB
global PgAcVar CurrentDB
set maxim 16384
setCursor CLOCK
catch {
wpg_select $CurrentDB "select oid from pg_database where datname='template1'" rec {
set maxim $rec(oid)
set dbname $PgAcVar(opendb,dbname)
if [catch {wpg_select $CurrentDB "select datlastsysoid from pg_database where datname='$dbname'" rec {
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment