pglast
pglast copied to clipboard
Comments distorted in case of multiple statements
I found out that a file like
-- First comment
SELECT * FROM first_table;
-- Second comment
SELECT * FROM second_table;
gets converted to
-- First comment
SELECT *
FROM first_table;
SELECT
-- Second comment
*
FROM second_table;
All comments other that the first one are distorted the same way. I was unable to debug it further.
Using pgpp -Ce /tmp/example.sql