Skip to content

Add support for `COMMENT ON column IS` statements + fix some issues with pgdump format

Felipe de Oliveira Hargreaves requested to merge comment-on-support into main

Some customizations specific to our needs - but since our fork already had breaking changes it is not too big of a deal.

  • Add support to COMMENT ON <column> IS <comment> statements - COMMENT ON is a broader statement that can apply to other structures, but I only added the rule for columns.
  • Add support to column definitions of the format <column_name> timestamp with time zone <constraints> - the parser was treating with as the reserved WITH keyword and breaking.
  • Add support for columns named key - we have a few of those across the db. Mysql would dump them with backticks (`key`), postgres does not. This caused issues as some dbs use KEY as an alias for index - the solution here was a bit hacky, I made it consider lowercase key as a valid column name definition, which works for our case.

Added test cases for the new rules and ran clobbera using this branch.

Merge request reports