Name

LIST-TABLES — Returns a list of database tables.Function

Syntax

      list-tables &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 table names in database which defaults to *default-database*. owner is NIL by default which means that only tables owned by users are listed. If owner is a string denoting a user name, only tables owned by owner are listed. If owner is :all then all tables are listed.

Examples

(list-tables :owner "fred")
=> ("type_table" "type_bigint" "employee" "company" "addr" "ea_join" "big")

(list-tables :owner :all)
=> ("pg_description" "pg_group" "pg_proc" "pg_rewrite" "pg_type" "pg_attribute"
    "pg_class" "pg_inherits" "pg_index" "pg_operator" "pg_opclass" "pg_am"
    "pg_amop" "pg_amproc" "pg_language" "pg_largeobject" "pg_aggregate"
    "pg_trigger" "pg_listener" "pg_cast" "pg_namespace" "pg_shadow"
    "pg_conversion" "pg_depend" "pg_attrdef" "pg_constraint" "pg_database"
    "type_table" "type_bigint" "employee" "company" "pg_statistic" "addr"
    "ea_join" "big")
      

Side Effects

None.

Affected by

*default-database*

Exceptional Situations

None.

See Also

create-table
drop-table
table-exists-p

Notes

None.