Re: \set to create shortcut

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux