Re: psql removes dashed comments

2022-04-07 Thread Tom Lane
Adrian Klaver writes: > On 4/7/22 11:25, Boris Zentner wrote: >> I was wondering why psql loose dashed comments and what can be done about >> this misbehaviour. > See this recent thread: > https://www.postgresql.org/message-id/265623A4-F304-4E68-90D0-343F614DB2B7%40americanefficient.com This mi

Re: psql removes dashed comments

2022-04-07 Thread Boris Zentner
> I was wondering why psql loose dashed comments and what can be done about > this misbehaviour. > > postgres=# \e > > > Because \e treats the query buffer as a single line of code and dashed > comments cannot be used, just like meta-commands cannot be used. > > Including a filename should es

Re: psql removes dashed comments

2022-04-07 Thread David G. Johnston
On Thursday, April 7, 2022, Boris Zentner wrote: > Hi, > > I was wondering why psql loose dashed comments and what can be done about > this misbehaviour. > > # start psql, paste something run it, edit \e, rerun and so on. At the end > all dashed comments are removed. > > > psql -Xe postgres > psq

Re: psql removes dashed comments

2022-04-07 Thread David G. Johnston
On Thursday, April 7, 2022, Boris Zentner wrote: > > I was wondering why psql loose dashed comments and what can be done about > this misbehaviour. > > postgres=# \e > > Because \e treats the query buffer as a single line of code and dashed comments cannot be used, just like meta-commands cannot

Re: psql removes dashed comments

2022-04-07 Thread Adrian Klaver
On 4/7/22 11:25, Boris Zentner wrote: Hi, I was wondering why psql loose dashed comments and what can be done about this misbehaviour. See this recent thread: https://www.postgresql.org/message-id/265623A4-F304-4E68-90D0-343F614DB2B7%40americanefficient.com -- Boris -- Adrian Klav

psql removes dashed comments

2022-04-07 Thread Boris Zentner
Hi, I was wondering why psql loose dashed comments and what can be done about this misbehaviour. I get often some sql, paste it into psql run and edit it via \e. A few iterations until everything works. But psql removes the comments and creates a lot extra work to restore the comments and chan