We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d84b7a commit 953002fCopy full SHA for 953002f
src/bin/pgaccess/lib/mainlib.tcl
@@ -105,12 +105,18 @@ global CurrentDB
105
106
107
proc {cmd_Functions} {} {
108
-global CurrentDB
+global PgAcVar CurrentDB
109
set maxim 16384
110
setCursor CLOCK
111
- catch {
112
- wpg_select $CurrentDB "select oid from pg_database where datname='template1'" rec {
113
- 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)
114
+ }
115
+ }] {
116
+ catch {
117
+ wpg_select $CurrentDB "select oid from pg_database where datname='template1'" rec {
118
+ set maxim $rec(oid)
119
120
}
121
122
.pgaw:Main.lb delete 0 end
0 commit comments