joereynolds / sql-lint

An SQL linter
MIT License
435 stars 41 forks source link

ALTER TYPE for postgres should be valid #237

Closed patextreme closed 1 month ago

patextreme commented 1 year ago

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

Steps to reproduce

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

joereynolds commented 1 month ago

Hey @patextreme , this has been fixed. Thanks :) https://github.com/joereynolds/sql-lint/pull/272