summaryrefslogtreecommitdiff
path: root/src/bin/pgtclsh/pgtclUtils.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pgtclsh/pgtclUtils.tcl')
-rw-r--r--src/bin/pgtclsh/pgtclUtils.tcl17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/bin/pgtclsh/pgtclUtils.tcl b/src/bin/pgtclsh/pgtclUtils.tcl
deleted file mode 100644
index e09e8b2b3a2..00000000000
--- a/src/bin/pgtclsh/pgtclUtils.tcl
+++ /dev/null
@@ -1,17 +0,0 @@
-# getDBs :
-# get the names of all the databases at a given host and port number
-# with the defaults being the localhost and port 5432
-# return them in alphabetical order
-proc getDBs { {host "localhost"} {port "5432"} } {
- # datnames is the list to be result
- set conn [pg_connect template1 -host $host -port $port]
- set res [pg_exec $conn "SELECT datname FROM pg_database ORDER BY datname"]
- set ntups [pg_result $res -numTuples]
- for {set i 0} {$i < $ntups} {incr i} {
- lappend datnames [pg_result $res -getTuple $i]
- }
- pg_result $res -clear
- pg_disconnect $conn
- return $datnames
-}
-