Skip to content

To handle partition drop when Partition table has FK #767

@AdarshHD

Description

@AdarshHD

v_sql := 'DROP TABLE %I.%I';

In the above we are trying to drop the partition directly, if there is an foreign key referring partition table which we are trying to drop then we will start seeing failure which throws error saying that the partition is being referred. Why can't we have approach like below

  • First detach the partition which is suppose to be dropped.
  • Secondly the drop the partition which it is suppose to drop.

This way having foreign key referring the partitioned table doesn't make any issue when running maintenance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions