Skip to content

Add msar.change_column_type function #4425

@mathemancer

Description

@mathemancer

Problem

Currently, the column type-changing functionality in the DB layer is hidden inside of a large, complex msar.alter_columns function. This is clean(ish) code, but it's difficult to debug and work with the inputs and outputs of this function.

Proposed solution

We should create a function with the signature:

msar.change_column_type(
  tab_id regclass,
  col_id smallint,
  new_typ regtype,
  typ_options jsonb,
  cast_options jsonb
) RETURNS void

We should then use this function in place of current logic within the msar.alter_columns function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions