Re: \set to create shortcut

Поиск
Список
Период
Сортировка
Искать
От
Laurenz Albe
Тема
Re: \set to create shortcut
Дата
Msg-id
ce0e10642ab15ffe5c300b983a078d9b0b7fc3d4.camel@cybertec.at
Ответ на
\set to create shortcut (Fabrice Chapuis)
Список
Дерево обсуждения
\set to create shortcut Fabrice Chapuis <fabrice636861@gmail.com>
Re: \set to create shortcut Laurenz Albe <laurenz.albe@cybertec.at>
Re: \set to create shortcut Erik Wienhold <ewie@ewie.name>
Re: \set to create shortcut Fabrice Chapuis <fabrice636861@gmail.com>
On Thu, 2024-02-22 at 09:32 +0100, Fabrice Chapuis wrote:
> I want to persist a shortcut between session.
>  
> > postgres [157394]=# \set cs 'select current_schema';
> > postgres [157394]=# :cs
> > ┌────────────────┐
> > │ current_schema │
> > ├────────────────┤
> > │ public         │
> > └────────────────┘
> > (1 row)
> 
> I put it in .pgsql_profile but it does not work
> 
> any idea?

It works for me if I put the semicolon inside the single quotes.

Yours,
Laurenz Albe
В списке pgsql-admin по дате отправления
От: Ulf Bengtner
Дата:
От: Erik Wienhold
Дата:
Сообщение: Re: \set to create shortcut
FAQ