LIST-VIEWS
Prev | Functional Data Definition Language (FDDL) | Next

## Name

LIST-VIEWS — Returns a list of database views.Function

## Syntax

          list-views &key owner database => result

## Arguments and Values

`owner`

  A string, `NIL` or :all.

`database`

  A database object which defaults to *default-database*.

`result`

  A list of strings.

## Description

Returns a list of strings representing view names in `database` which defaults to *default-database*. `owner` is `NIL` by default which means that only views owned by users are listed. If `owner` is a string denoting a user name, only views owned by `owner` are listed. If `owner` is :all then all views are listed.

## Examples

    (list-views :owner "fred")
    => ("lenins_group")

    (list-views :owner :all)
    => ("pg_user" "pg_rules" "pg_views" "pg_tables" "pg_indexes" "pg_stats"
        "pg_stat_all_tables" "pg_stat_sys_tables" "pg_stat_user_tables"
        "pg_statio_all_tables" "pg_statio_sys_tables" "pg_statio_user_tables"
        "pg_stat_all_indexes" "pg_stat_sys_indexes" "pg_stat_user_indexes"
        "pg_statio_all_indexes" "pg_statio_sys_indexes" "pg_statio_user_indexes"
        "pg_statio_all_sequences" "pg_statio_sys_sequences"
        "pg_statio_user_sequences" "pg_stat_activity" "pg_stat_database"
        "pg_locks" "pg_settings" "lenins_group")

## Side Effects

None.

## Affected by

*default-database*

## Exceptional Situations

None.

## See Also

`create-view`
`drop-view`
`view-exists-p`

## Notes

`list-views` is a CLSQL extension.

Prev | Up | Next
DROP-VIEW | Home | VIEW-EXISTS-P