From: | "Colin 't Hart" <colin(at)sharpheart(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Josh Kupershmidt <schmiddy(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [PATCH] psql \n shortcut for set search_path = |
Date: | 2012-07-10 16:24:54 |
Message-ID: | CAMon-aQ8XypcX984VfWyu22vkztn6HYjgb3vrt8fbt42gNx3UA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 10 July 2012 18:00, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Josh Kupershmidt <schmiddy(at)gmail(dot)com> writes:
> > On Tue, Jul 10, 2012 at 2:09 AM, Colin 't Hart <colin(at)sharpheart(dot)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 very often (I don't), at the expense of
> > adding yet another command to remember.
>
> Another point here is that we are running low on single-letter backslash
> command names in psql. I'm not sure that "SET SEARCH_PATH" is so useful
> as to justify using up one of the ones that are left.
>
> ISTM there was some discussion awhile back about user-definable typing
> shortcuts in psql. I don't recall any details, but being able to set
> up "SET SEARCH_PATH" as a user-definable shortcut if it's useful to you
> would eliminate the question about whether it's useful to everyone.
>
And these could be setup to be available on psql startup by adding them to
.psqlrc
While I like my \n idea (heck, I thought of it :-) ), this would be a very
good generic solution.
I did a quick search but couldn't find the relevant discussion: do you
remember roughly when it was?
If I find it I could have a go at trying to implement it, but it might
exceed my ability in C...
Cheers,
Colin
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2012-07-10 16:26:09 | Re: Using pg_upgrade on log-shipping standby servers |
Previous Message | David Fetter | 2012-07-10 16:24:08 | Re: [PATCH] psql \n shortcut for set search_path = |