Re: Colors/bold chars in a select? - Mailing list pgsql-novice

From Ennio-Sr
Subject Re: Colors/bold chars in a select?
Date
Msg-id 20060413221324.GA9716@deby.ei.hnet
Whole thread Raw
In response to Re: Colors/bold chars in a select?  (<operationsengineer1@yahoo.com>)
Responses Re: Colors/bold chars in a select?
List pgsql-novice
* operationsengineer1@yahoo.com <operationsengineer1@yahoo.com> [130406, 13:49]:
> > Hi all!
> > This is just a peregrine thought:
> > is it at all possible to print (on screen) in bold
> > chars/or colour the
> > lines of a select result that satisfy a certain
> > condition?
> > Regards,
> >     Ennio
>
> it seems to me that the method woul dbe specific to
> whatever system you are using to display the data.
>
> eg, if the display is html, then you could include
> html (or some conversion that could be converted back
> to avoid scripting attacks) where applicable.
>
> you may also be able to display the text and apply
> regexes in order to identify the characters and then
> make them bold without the html in the db.
>
> perhaps a stored procedure could help with this, but i
> lack experience in that area as of now.
>
> this seems like more of an application problem than a
> db problem, though.
>

Mmmm...
I fear that your last sentence is very true and unluckily enough is what
I would need to accomplish my goal; I'm already getting a coloured
display of the result of my selection ...; but let me explain better
what I was thinking about, as I realize it was not very clear:

Suppose the result of my select is a table like this:

item       ..... price_at_time_X ..... price_at_time_Y
------------------------------------------------------
aaaa                 10.1245              12.13
bbbb                  5.14                 5.04
cccc                  0.10                 0.12

My question is:  can I get a coloured evidence that time_Y prices of
items 'aaaa' and 'bbbb' are higher than at time_X so as to get a more
immediate evidence of what is going on? Think about stock prices, as an
example ;-)
[I've already arranged to have separate lists of all items with
higher/lower prices, but was wondering whether there was any other
possibility]

Thanks for your answer, anyway.
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 by date:

Previous
From:
Date:
Subject: Re: Steps to open or import a data file from Pg 8.1.3?
Next
From: Bruce Momjian
Date:
Subject: Re: The COPY command and csv files