================================================================================
Drop function
================================================================================

DROP FUNCTION my_function;

--------------------------------------------------------------------------------

(program
  (statement
    (drop_function
      (keyword_drop)
      (keyword_function)
      (object_reference
        name: (identifier)))))

================================================================================
Drop function if exists
================================================================================

DROP FUNCTION IF EXISTS my_function;

--------------------------------------------------------------------------------

(program
  (statement
    (drop_function
      (keyword_drop)
      (keyword_function)
      (keyword_if)
      (keyword_exists)
      (object_reference
        (identifier)))))

================================================================================
Drop table
================================================================================

DROP TABLE my_table;

--------------------------------------------------------------------------------

(program
  (statement
    (drop_table
      (keyword_drop)
      (keyword_table)
      (object_reference
        name: (identifier)))))

================================================================================
Drop table with FQN
================================================================================

DROP TABLE my_table.my_schema.my_table;

--------------------------------------------------------------------------------

(program
  (statement
    (drop_table
      (keyword_drop)
      (keyword_table)
      (object_reference
        database: (identifier)
        schema: (identifier)
        name: (identifier)))))

================================================================================
Drop table and cascade through
================================================================================

DROP TABLE my_table CASCADE;

--------------------------------------------------------------------------------

(program
  (statement
    (drop_table
      (keyword_drop)
      (keyword_table)
      (object_reference
        name: (identifier))
      (keyword_cascade))))

================================================================================
Drop view
================================================================================

DROP VIEW my_view;

--------------------------------------------------------------------------------

(program
  (statement
    (drop_view
      (keyword_drop)
      (keyword_view)
      (object_reference
        name: (identifier)))))

================================================================================
Drop view with FQN
================================================================================

DROP VIEW my_database.my_schema.my_view;

--------------------------------------------------------------------------------

(program
  (statement
    (drop_view
      (keyword_drop)
      (keyword_view)
      (object_reference
        database: (identifier)
        schema: (identifier)
        name: (identifier)))))

================================================================================
Drop index
================================================================================

DROP INDEX idx;

--------------------------------------------------------------------------------

(program
  (statement
    (drop_index
      (keyword_drop)
      (keyword_index)
      name: (identifier))))

================================================================================
Drop index
================================================================================

DROP INDEX idx ON tbl;

--------------------------------------------------------------------------------

(program
  (statement
    (drop_index
      (keyword_drop)
      (keyword_index)
      name: (identifier)
      (keyword_on)
      (object_reference
        name: (identifier)))))

================================================================================
Drop index cascade full sequence
================================================================================

DROP INDEX CONCURRENTLY IF EXISTS idx CASCADE ON tbl;

--------------------------------------------------------------------------------

(program
  (statement
    (drop_index
      (keyword_drop)
      (keyword_index)
      (keyword_concurrently)
      (keyword_if)
      (keyword_exists)
      name: (identifier)
      (keyword_cascade)
      (keyword_on)
      (object_reference
        name: (identifier)))))

================================================================================
Drop index restrict full sequence
================================================================================

DROP INDEX CONCURRENTLY IF EXISTS idx RESTRICT ON tbl;

--------------------------------------------------------------------------------

(program
  (statement
    (drop_index
      (keyword_drop)
      (keyword_index)
      (keyword_concurrently)
      (keyword_if)
      (keyword_exists)
      name: (identifier)
      (keyword_restrict)
      (keyword_on)
      (object_reference
        name: (identifier)))))

================================================================================
Drop schema
================================================================================

DROP SCHEMA IF EXISTS myschema CASCADE;

--------------------------------------------------------------------------------

(program
  (statement
    (drop_schema
      (keyword_drop)
      (keyword_schema)
      (keyword_if)
      (keyword_exists)
      (identifier)
      (keyword_cascade))))

================================================================================
Drop Database
================================================================================

DROP DATABASE IF EXISTS hollywood WITH FORCE;

--------------------------------------------------------------------------------

(program
  (statement
    (drop_database
      (keyword_drop)
      (keyword_database)
      (keyword_if)
      (keyword_exists)
      (identifier)
      (keyword_with)
      (keyword_force))))

================================================================================
Drop Role
================================================================================

DROP ROLE hansel;
DROP GROUP fairy;
DROP USER rapunzel;

--------------------------------------------------------------------------------

(program
  (statement
    (drop_role
      (keyword_drop)
      (keyword_role)
      (identifier)))
  (statement
    (drop_role
      (keyword_drop)
      (keyword_group)
      (identifier)))
  (statement
    (drop_role
      (keyword_drop)
      (keyword_user)
      (identifier))))

================================================================================
Drop sequence
================================================================================

DROP SEQUENCE IF EXISTS serial RESTRICT;

--------------------------------------------------------------------------------

(program
  (statement
    (drop_sequence
      (keyword_drop)
      (keyword_sequence)
      (keyword_if)
      (keyword_exists)
      (object_reference
        (identifier))
      (keyword_restrict))))

================================================================================
Drop extension
================================================================================

DROP EXTENSION my_extension;

--------------------------------------------------------------------------------

(program
  (statement
    (drop_extension
      (keyword_drop)
      (keyword_extension)
      (identifier))))
