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

2012-07-13 Thread Colin 't Hart
On 10 July 2012 18:00, Tom Lane t...@sss.pgh.pa.us wrote: Josh Kupershmidt schmi...@gmail.com writes: On Tue, Jul 10, 2012 at 2:09 AM, Colin 't Hart co...@sharpheart.org wrote: Attached please find a trivial patch for psql which adds a \n meta command as a shortcut for typing set

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

2012-07-13 Thread Colin 't Hart
On 10 July 2012 18:24, David Fetter da...@fetter.org wrote: On Tue, Jul 10, 2012 at 12:00:06PM -0400, Tom Lane wrote: Josh Kupershmidt schmi...@gmail.com writes: On Tue, Jul 10, 2012 at 2:09 AM, Colin 't Hart co...@sharpheart.org wrote: Attached please find a trivial patch for psql

[HACKERS] [PATCH] psql \n shortcut for set search_path =

2012-07-10 Thread Colin 't Hart
Hi, Attached please find a trivial patch for psql which adds a \n meta command as a shortcut for typing set search_path =. This allows you to navigate a database very quickly in psql as follows: \dn \n my_schema \d \d my_table etc. Not yet done: updating documentation (psql internal help,

[HACKERS] [PATCH] psql \n shortcut for set search_path =

2012-07-10 Thread Colin 't Hart
Hi, Attached please find a trivial patch for psql which adds a \n meta command as a shortcut for typing set search_path =. This allows you to use psql as follows: \dn \n my_schema \d \d my_table etc. Not yet done: updating documentation (psql internal help, psql man page, main

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

2012-07-10 Thread Josh Kupershmidt
On Tue, Jul 10, 2012 at 2:09 AM, Colin 't Hart co...@sharpheart.org wrote: Attached please find a trivial patch for psql which adds a \n meta command as a shortcut for typing set search_path =. I think the use-case is a bit narrow: saving a few characters typing on a command not everyone uses

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

2012-07-10 Thread Tom Lane
Josh Kupershmidt schmi...@gmail.com writes: On Tue, Jul 10, 2012 at 2:09 AM, Colin 't Hart co...@sharpheart.org wrote: Attached please find a trivial patch for psql which adds a \n meta command as a shortcut for typing set search_path =. I think the use-case is a bit narrow: saving a few

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

2012-07-10 Thread David Fetter
On Tue, Jul 10, 2012 at 12:00:06PM -0400, Tom Lane wrote: Josh Kupershmidt schmi...@gmail.com writes: On Tue, Jul 10, 2012 at 2:09 AM, Colin 't Hart co...@sharpheart.org wrote: Attached please find a trivial patch for psql which adds a \n meta command as a shortcut for typing set

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

2012-07-10 Thread David Fetter
On Tue, Jul 10, 2012 at 06:26:22PM +0200, Colin 't Hart wrote: On 10 July 2012 18:24, David Fetter da...@fetter.org wrote: On Tue, Jul 10, 2012 at 12:00:06PM -0400, Tom Lane wrote: Josh Kupershmidt schmi...@gmail.com writes: On Tue, Jul 10, 2012 at 2:09 AM, Colin 't Hart

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

2012-07-10 Thread Tom Lane
David Fetter da...@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

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

2012-07-10 Thread Björn Häuser
Am 10.07.2012 18:44, schrieb Tom Lane: David Fetter da...@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=#