Re: Simple, but VERYuseful enhancement for psql command - or am I missing something? - Mailing list pgsql-general

From Ben
Subject Re: Simple, but VERYuseful enhancement for psql command - or am I missing something?
Date
Msg-id d54b52ee1c0ccd9d4f5782ce468daba8@news.teranews.com
Whole thread Raw
In response to Simple, but VERYuseful enhancement for psql command - or am I missing something?  ("Ben" <reply@to-the-newsgroup.com>)
List pgsql-general
I want to thank everyone for replying - that was really great.

My specific issue sounds like it would be best addressed using variables.
Thanks hugely for the pointer on that one.

Displaying things vertically isn't going to work for me in particular; you
lose too much display area that way. I need to be able to see multiple
results. I'll keep \x in mind for later, though.

\e allows you to edit an external file; this is essentially the problem,
rather than the solution: I don't want to edit it outside. I want it in
the query buffer where I can just hit ^ a few times, edit right there, and
let fly. I do this all the time now, the problem is I have to hand-enter
the query the first time, or I can't do it at all.

What I was suggesting was the ability to load an external file into the
query buffer (the line buffer, maybe I mean) such that (a) it is NOT
executed a'la \i, but can be picked up into the current line for editing
using the ^ arrow, changed as required, then fired off. This is a very
general solution to having things around that you can boilerplate, or
simply use because you know they're close, even if that wasn't the idea
originally.

The idea of using & seems cool enough, but since you can use SET and then
embed them in the external file, that'll do about the same thing, it seems
to me.

Thanks again for all the responses. You people rock.

--Ben


pgsql-general by date:

Previous
From: Matthew Hixson
Date:
Subject: using Postgres to store many small files
Next
From: "scott.marlowe"
Date:
Subject: Re: Question on stored functions