Duplicate `DEFERRABLE INITIALLY DEFERRED` in output
Closed this issue · 3 comments
bennieswart commented
Consider the following example where DEFERRABLE INITIALLY DEFERRED
appears twice in the output. This happens in 5.3 but seems to be present in older versions too as far back as 3.5.
Python 3.11.3 (main, Jun 5 2023, 09:32:32) [GCC 13.1.1 20230429] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pglast import prettify
>>> prettify("ALTER TABLE tab1 ADD CONSTRAINT foo FOREIGN KEY (id1) REFERENCES tab2 (id2) DEFERRABLE INITIALLY DEFERRED")
'ALTER TABLE tab1 ADD CONSTRAINT foo FOREIGN KEY (id1) REFERENCES tab2 (id2) DEFERRABLE INITIALLY DEFERRED DEFERRABLE INITIALLY DEFERRED'
lelit commented
Thanks again for the report, this kind of defects is harder to catch in the test suite 😭
lelit commented
This should be fixed as well, in just released v3, v4 and v5!
bennieswart commented
Great work, thanks!