I always used /* COMMENT */ to temporarily comment out part of the code, because I thought it would lose the rest in the request (after -- ), because it converts the code into one line
The new request buffer is then reprocessed according to the usual psql rules, where the entire buffer is processed as a single line
(((I had the same error in Oracle 8.smth something - in the dumping package, it ignored all the characters after the comment -- in the package code)))
Surprisingly, \e editor loses only one line (commented with the help -- one).
Answer : use /**/ comment and it will continue to comment through the runs
Tip : if you use vim , you can skip to the end of the line using the ESC + $ sequence, so this doesn't really matter much in the effort involved with comments --
source share