sql-lint icon indicating copy to clipboard operation
sql-lint copied to clipboard

ALTER TYPE for postgres should be valid

Open patextreme opened this issue 3 years ago • 0 comments

An error was raised when encountered ALTER TYPE ..... statement running sql-lint through megalinter

Steps to reproduce

  • create some .sql file with ALTER TYPE foo RENAME TO bar;
  • run megaliter with this option SQL_SQL_LINT_ARGUMENTS: -d postgres

Output

[sql-lint: postgres-invalid-alter-option] Option 'type' is not a valid option, must be one of '["column","online","offline","ignore","database","event","function","procedure","server","table","tablespace","view"]'.

In my case, the --ignore-errors=postgres-invalid-alter-option flag was added as a workaround.

Expected Bahavior

No error from linter. ALTER TYPE ... should be valid. https://www.postgresql.org/docs/current/sql-altertype.html

patextreme avatar Jan 18 '23 12:01 patextreme