List user created schemas in Vertica database

Bart Gawrych - Dataedo Team Bart Gawrych 2019-09-17

Table of Contents:


    This query returns list of user created, non-system schemas.

    Query

    select schema_id, 
           schema_name,
           u.user_name as owner,
           create_time
    from v_catalog.schemata s
    join v_catalog.users u
         on s.schema_owner_id = u.user_id
    where schema_name != 'public'
          and is_system_schema = 'false'
    order by schema_name;
    

    Columns

    • schema_id - schema id, unique within the database
    • schema_name - name of the schema
    • owner - principal that owns this schema
    • create_time - date and time when schema was created

    Rows

    • One row represents one schema in a database created by user
    • Scope of rows: all user's schemas in a database
    • Ordered by schema name

    Rows

    • One row represents one schema
    • Scope of rows: all user created schemas
    • Ordered by schema name

    Sample results

    0
    There are no comments. Click here to write the first comment.

    By continuing to use our website, you consent to the use of cookies in accordance with our Privacy Policy.
    Accept