Re: [PATCH] psql \n shortcut for set search_path =

From: Björn Häuser <bjoernhaeuser(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] psql \n shortcut for set search_path =
Date: 2012-07-10 18:10:06
Message-ID: 4FFC6FFE.5010702@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Am 10.07.2012 18:44, schrieb Tom Lane:
> David Fetter <david(at)fetter(dot)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
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2012-07-10 18:56:40 Re: enhanced error fields
Previous Message Greg Sabino Mullane 2012-07-10 17:35:28 Re: Btree or not btree? That is the question