Sample Header Ad - 728x90

SQL Comments disappear with psql and `\e`

6 votes
2 answers
623 views
Is there anyway at all, ever to change the behavior of comments in psql. Take the query below. Execute it. CREATE TABLE foo AS SELECT x AS id, -- x AS id2, x AS id3 FROM generate_series(1,50) AS x; Run that in psql. Then run \e. Now at least, for me what I see in my editor is the line absent. This is driving me crazy. Is there a way around this.. The comment is just absent from the buffer that gets passed to the editor. Often, it's commented and not deleted because I want to *uncomment* it at a later point. Comment gone
Asked by Evan Carroll (65532 rep)
Mar 9, 2017, 03:07 AM
Last activity: Sep 2, 2022, 12:33 PM