Обсуждение: use of in psql

Поиск
Список
Период
Сортировка

use of in psql

От
"Luis P. Mendes"
Дата:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I have postgres installed both in a Debian Sarge and in a Slackare 10.2
systems.

When I connect to a database via psql and do a select * from table; I
get the first page of results, considering \pset pager is on.

In Debian, I can press the <end> key to go directly to the last results
or I can use <page up> or <page down> to move across the results.

In the Slackware system, I can't do that.  Can someone explain how to
activate this function?


Luis
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEFMHYHn4UHCY8rB8RAoq/AJ42AFpih83DUNvjLysLXBzu92aWggCdHOb5
hLa9iZEwF8UzCY27aQ7HVqg=
=PM6a
-----END PGP SIGNATURE-----

Re: use of in psql

От
Bruce Momjian
Дата:
Luis P. Mendes wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> I have postgres installed both in a Debian Sarge and in a Slackare 10.2
> systems.
>
> When I connect to a database via psql and do a select * from table; I
> get the first page of results, considering \pset pager is on.
>
> In Debian, I can press the <end> key to go directly to the last results
> or I can use <page up> or <page down> to move across the results.
>
> In the Slackware system, I can't do that.  Can someone explain how to
> activate this function?

Sounds like the PAGER is set differently on the two systems.

--
  Bruce Momjian   http://candle.pha.pa.us
  SRA OSS, Inc.   http://www.sraoss.com

  + If your life is a hard drive, Christ can be your backup. +

Re: use of in psql

От
Dianne Yumul
Дата:
On Mar 18, 2006, at 6:15 PM, Bruce Momjian wrote:

> Luis P. Mendes wrote:
>> When I connect to a database via psql and do a select * from table; I
>> get the first page of results, considering \pset pager is on.
>>
>> In Debian, I can press the <end> key to go directly to the last
>> results
>> or I can use <page up> or <page down> to move across the results.
>>
>> In the Slackware system, I can't do that.  Can someone explain how to
>> activate this function?
>
> Sounds like the PAGER is set differently on the two systems.

I have the same issue too. I can only use the space bar to go down
the results, page up and down keys do not work and neither does the
end key.

I have Postgresql 8.0.6, FC 4.

Thank you.

Dianne



Re: use of in psql

От
"Jim C. Nasby"
Дата:
On Mon, Mar 20, 2006 at 10:03:28AM -0800, Dianne Yumul wrote:
> On Mar 18, 2006, at 6:15 PM, Bruce Momjian wrote:
>
> >Luis P. Mendes wrote:
> >>When I connect to a database via psql and do a select * from table; I
> >>get the first page of results, considering \pset pager is on.
> >>
> >>In Debian, I can press the <end> key to go directly to the last
> >>results
> >>or I can use <page up> or <page down> to move across the results.
> >>
> >>In the Slackware system, I can't do that.  Can someone explain how to
> >>activate this function?
> >
> >Sounds like the PAGER is set differently on the two systems.
>
> I have the same issue too. I can only use the space bar to go down
> the results, page up and down keys do not work and neither does the
> end key.
>
> I have Postgresql 8.0.6, FC 4.

This is almost certainly not a PostgreSQL issue. Either the PAGER
environment variable is set differently, or there's some issue with
less/more/whatever you're using.
--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

Re: use of in psql

От
"Luis P. Mendes"
Дата:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

| I have the same issue too. I can only use the space bar to go down  the
| results, page up and down keys do not work and neither does the  end key.

Thank you Bruce!  I lost any hope that I'd get any answer in this
newsgroup, so I posted the same question at alt.os.linux.slackware:

"""
Set the `PAGER' environment variable to something other than `more'
(psql's default)...

~  $ PAGER=less psql dbname
"""

It works.  Now, I just have to make this change permanent.  I've read
about psqlrc (or is it .psqlrc?) but it didn't work out, yet.  When I
get there I'll post here.


Luis
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEHwTdHn4UHCY8rB8RAhuIAJ91J2EKBquaIV7p86TAS63viiEm2wCgumkQ
GwZf/BN3Dob6W7B/9bZ5a9k=
=QOk+
-----END PGP SIGNATURE-----

Re: use of in psql

От
"Jim C. Nasby"
Дата:
On Mon, Mar 20, 2006 at 07:39:10PM +0000, Luis P. Mendes wrote:
> It works.  Now, I just have to make this change permanent.  I've read
> about psqlrc (or is it .psqlrc?) but it didn't work out, yet.  When I
> get there I'll post here.

Why not just put that in your ~/.profile / ~/.cshrc / whatever file your
shell uses.
--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461