Skip to content

feat(tables): show whether abstract table is table or view (or materialized, etc...) #9859

@gforsyth

Description

@gforsyth

I was thinking about #9199 and led myself down a rabbit hole.

In that issue, we discussed making sure that all backends create views when doing a read_* so they don't clobber existing data.

Then if the user wants to re-use an existing name, they can first drop the existing table object using drop_table or drop_view.

One hiccup there, how do they know whether it's a table or a view? Chances are, they don't, especially if we created it for them.

Given that, should we rethink the output of list_tables (and the TablesAccessor) to include information about what kind of abstract table a given object is?

This dovetails with the work on the DDL accessor thing, but we also can't expect users to know to look in con.ddl.list_views() to check if the existing name is there or not.

What if we fancy up the output of con.tables to also indicate whether a given object is a table or a view (or other) ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    ddlIssues related to creating or altering data definitions

    Type

    No type

    Projects

    Status

    backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions