Function: sql-postgres-list-databases
sql-postgres-list-databases is a byte-compiled function defined in
sql.el.gz.
Signature
(sql-postgres-list-databases)
Documentation
Return a list of available PostgreSQL databases.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/sql.el.gz
(defun sql-postgres-list-databases ()
"Return a list of available PostgreSQL databases."
(when (executable-find sql-postgres-program)
(let ((res '()))
(ignore-errors
(dolist (row (process-lines sql-postgres-program
"--list"
"--no-psqlrc"
"--tuples-only"))
(when (string-match "^ \\([^ |]+\\) +|.*" row)
(push (match-string 1 row) res))))
(nreverse res))))