From: | Antoine Reid <areid(at)kernel-panic(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Cc: | Hugo Coolens <hugo(dot)coolens(at)skynet(dot)be>, Philip Hallstrom <philip(at)adhesivemedia(dot)com> |
Subject: | Re: terminal with horizontal scrollbar |
Date: | 2002-02-26 22:45:23 |
Message-ID: | 20020226174523.C63197@wumpus.lan.edmarketing.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Feb 26, 2002 at 10:07:25AM -0800, Philip Hallstrom wrote:
> Can't help with the terminal app, but there's an option in psql to have it
> print out the results verticly (one field per line)... doesn't work real
> well if lots of rows get returned, but for one or two it's nice.
Yes, using \x will give you each record on multiple lines (one attribute per
line). When viewing a large table, you might want to (ab)use some options on
your pager. Specifically:
export PAGER="/usr/bin/less -S"
Note this will only work if psql calls the pager, and it only does so if the
number of lines will be greater than the height of your xterm. There might
be a way to tell psql to unconditionnaly pipe through PAGER, but then, even
in simple queries, you would have to hit 'q' to get back to psql's prompt...
I haven't yet looked in psql's source to see where that lines number check gets
done, but I'm sure one could change that check to use an option rather than
the actual number of lines.
Just my 2 cents (CDN)...
Antoine
> On Mon, 25 Feb 2002, Hugo Coolens wrote:
>
> > When using select in psql for tables with a lot of columns, I often get
> > rows which wrap at the right side of the screen to the next row, this
> > makes the columns into a mess. It would be nice to have a terminal
> > (something like rxvt or xterm) which allows horizontal scrolling. Does
> > anyone know of such a terminal program?
> >
> > best regards,
> > Hugo
> > p.s. I'm not interested in using pgaccess as a workaround for this, I
> > just want to use plain psql
> > It's also not a solution for me to use a smaller font
--
| Antoine Reid, SysAdmin, NetAdmin |
|---------------------------------------------------------------------------|
| Magnetism, electricity and motion are like a three for-two special offer: |
| If you have two of them, the third one comes free. |
From | Date | Subject | |
---|---|---|---|
Next Message | Bill McGonigle | 2002-02-26 22:45:46 | Re: pg_dumpall storing multiple copies of DB's? |
Previous Message | Doug McNaught | 2002-02-26 22:39:45 | Re: pg_dumpall storing multiple copies of DB's? |