Re: Psql 'Expanded display (\x)' behaviour

From: Ennio-Sr <nasr(dot)laili(at)tin(dot)it>
To: pgsql-bugs(at)postgresql(dot)org
Cc: peter_e(at)gmx(dot)net
Subject: Re: Psql 'Expanded display (\x)' behaviour
Date: 2003-04-16 16:50:12
Message-ID: 20030416165012.GA2554@deby.ei.hnet
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

* Peter Eisentraut <peter_e(at)gmx(dot)net> [140403, 01:40]:
> Ennio-Sr writes:
> [cut]
>
> Turn off the pager in psql and see if that makes a difference. Check the
> ...

Coming back just to tell you what I did to solve my empasse. May be this
could be useful to other newbies ... :-)

As I told you in my previous post, turning the pager off did allow me to
display clearly my test db; however, when I came back to my true db, I
could only read last page (because the pager was off).
After some more readings, here is what I did:
----------------------
1. Being in dos/dbase (cp437) created 'bib_win.txt' file from the *.dbf
2. Copied the txt file in my linux home dir
3. less bib_win.txt # showed me that accented letters did not display
4. $ consolechars -f /usr/share/consolefonts/iso01.f16.psf.gz
5. $ consolechars -miso01.acm.gz
6. $ cp bib_win.txt bib_lt1.txt # to have an extra copy to work on
7. $ konwert cp437-iso1 bib_lt1.txt -o bib_lt1.txt
didn't seem to work well, so I simply did:
8. $ konwert cp437-iso1 bib_lt1.txt -O
9. less bib_lt1.txt # finally I could see my accented letters!

At this point I switched to psql:

10. $ psql mydb
\! grep -r less /usr/bin/pager # to make sure that pager used less
# (lv didn't work, so I removed it)
\encoding latin1
\i bib_import_lt1.sql # to import bib_win.txt in a 'raw' pg db
\i bib_crea_lt1.sql # to take off columns containing delimiters
\x
select autore, titolo, altre_notizie, editore from bib_lt1 where autore like '%Tour%' ; # ok, all letters are correctly displayed
\pset pager # took the pager off
select autore, titolo, altre_notizie, editore from bib_lt1 where autore like '%Tour%' ; # but the screen was continuously srolling!
\pset pager # put back the pager
select autore, titolo, altre_notizie, editore from bib_lt1 where autore like '%Tour%' ; # checked again tha everything is ok.
-----------------------
I am not sure weather this is the shortest way to accomplish my task;
the fact is that it seems to work!
At the end of the story, may I add that my expertise in linux and pgres
is not such that I can conclude saying that psql is in some way 'bugged'
as concerns the pager or the /x option; perhaps it only lacks clearer
information on how to set fonts and charsets so as to have things
working smoothly with characters over ascii 127.

Thank you again for your attention and help.
Regards,
Ennio.

--
[Perche' usare Win$ozz (dico io) se ..."anche uno sciocco sa farlo. \\?//
Fa' qualche cosa di cui non sei capace!" (diceva Henry Miller) ] (°|°)
[Why to use Win$ozz (I say) if ... "even a fool can do that. )=(
Do something you aren't good at!" (used to say Henry Miller) ]

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message pgsql-bugs 2003-04-16 18:00:08 Bug #946: Problem to make version 7.3.2 with cygwin
Previous Message Riaan van Jaarsveld 2003-04-16 11:43:46 PostgreSQL 7.3 Installation Error