Re: Colors/bold chars in a select?

Поиск
Список
Период
Сортировка
От Ennio-Sr
Тема Re: Colors/bold chars in a select?
Дата
Msg-id 20060420204040.GA6460@deby.ei.hnet
обсуждение исходный текст
Ответ на Re: Colors/bold chars in a select?  (Andrew Chambers <andychambers2002@yahoo.co.uk>)
Ответы Re: Colors/bold chars in a select?
Список pgsql-novice
* Andrew Chambers <andychambers2002@yahoo.co.uk> [150406, 12:31]:
> * Ennio-Sr <nasr.laili@tin.it> [2006-04-14 23:27:38 +0200]:

> .....

> This task sounds like a job for awk.  The syntax of the script below
> might not be quite correct but you should be able to do something
> like...
>
> psql -f query.sql |awk ' { if($2 >= $1) print "\e[32;01m" $0
>                            else print $0
>                          } '
>
Hi Andrew,
thank you for your suggestion: I wouldn't expect it was possible to pipe the psql
command output and was looking for a psql command ...

Unfortunately, awk does the job perfectly in a test table (having
only a few output fields) whereas it seems to get confused when I use it
for the real table and with multiple conditions ( if .. do; else if ..
do ; else do ). I'm reading man awk just now ... ;)

Best 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 use Win$ozz (I say) if ... "even a fool can do that.              )=(
 Do something you aren't good at!" (as Henry Miller used to say) ]

В списке pgsql-novice по дате отправления:

Предыдущее
От: "Frances Collier"
Дата:
Сообщение: Re: postgresql connection problems
Следующее
От: Ketema Harris
Дата:
Сообщение: Constraining future rows based on past rows