LIST-DATABASES
Prev | Connection and Initialisation | Next

## Name

LIST-DATABASES — List databases matching the supplied connection spec and database type.Function

## Syntax

          list-databases connection-spec &key database-type => result

## Arguments and Values

`connection-spec`

  A connection specification

`database-type`

  A database type specifier, i.e. a keyword. This defaults to the value of *default-database-type*

`result`

  A list of matching databases.

## Description

This function returns a list of databases existing in the database system specified by `database-type`.

## Examples

    (list-databases '("localhost" "new" "dent" "dent") :database-type :postgresql)
    => ("address-book" "sql-test" "template1" "template0" "test1" "dent" "test")

## Side Effects

None.

## Affected by

None.

## Exceptional Situations

An exception maybe thrown if the database system does not receive administrator-level authentication since function may need to read the administrative database of the database system.

## See Also

`create-database`
`destroy-database`
`probe-database`

## Notes

`list-databases` is a CLSQL extension.

Prev | Up | Next
PROBE-DATABASE | Home | WITH-DATABASE