Re: psql removes dashed comments

Поиск
Список
Период
Сортировка
От Boris Zentner
Тема Re: psql removes dashed comments
Дата
Msg-id DC789296-C915-4265-914E-C488E3936B09@2bz.de
обсуждение исходный текст
Ответ на Re: psql removes dashed comments  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-general
> 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-commandscannot be used. 
>
> Including a filename should establish the behavior you desire.
>
Thanks David! \e filename does indeed help a bit but the file must exists and I have to type and invent the filename
beforeI start. 
My workaround was \! vim xyz.sql but it is not satisfying.

Without thinking to depth about this, maybe a new meta command could help?
Something like \eee to fill an initially empty temporary file from the query buffer on the first call and reuse it over
theruntime of the psql command. 


В списке pgsql-general по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: psql removes dashed comments
Следующее
От: Tom Lane
Дата:
Сообщение: Re: psql removes dashed comments