Re: [PATCH] psql \n shortcut for set search_path = - Mailing list pgsql-hackers

From Björn Häuser
Subject Re: [PATCH] psql \n shortcut for set search_path =
Date
Msg-id 4FFC6FFE.5010702@gmail.com
Whole thread Raw
In response to Re: [PATCH] psql \n shortcut for set search_path =  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Am 10.07.2012 18:44, schrieb Tom Lane:
> David Fetter <david@fetter.org> writes:
>> On Tue, Jul 10, 2012 at 12:00:06PM -0400, Tom Lane wrote:
>>> ISTM there was some discussion awhile back about user-definable
>>> typing shortcuts in psql.
>
>> In some sense, we already have them:
>
> Good point:
>
> regression=# show search_path ;
>    search_path
> ----------------
>   "$user",public
> (1 row)
>
> regression=# \set n 'set search_path ='
> regression=# :n foo;
> SET
> regression=# show search_path ;
>   search_path
> -------------
>   foo
> (1 row)

Well, a separate command would be mandatory to have tab-completion? 
Maybe not a single-letter one, but I really would appreciate such an 
command.
Setting the search_path is a thing I do several times a day.

Björn

>
> So maybe what's needed here is a documentation example showing how you
> can use a \set in ~/.psqlrc to provide this sort of functionality.
>
>             regards, tom lane
>




pgsql-hackers by date:

Previous
From: Greg Sabino Mullane
Date:
Subject: Re: Btree or not btree? That is the question
Next
From: Peter Geoghegan
Date:
Subject: Re: enhanced error fields