Skip site navigation (1) Skip section navigation (2)

Re: Colors/bold chars in a select?

From: Ennio-Sr <nasr(dot)laili(at)tin(dot)it>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Colors/bold chars in a select?
Date: 2006-04-13 22:13:24
Message-ID: 20060413221324.GA9716@deby.ei.hnet (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
* operationsengineer1(at)yahoo(dot)com <operationsengineer1(at)yahoo(dot)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.

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

Thanks for your answer, anyway.

[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) ]

In response to


pgsql-novice by date

Next:From: Bruce MomjianDate: 2006-04-13 22:29:22
Subject: Re: The COPY command and csv files
Previous:From: operationsengineer1Date: 2006-04-13 21:21:43
Subject: Re: Steps to open or import a data file from Pg 8.1.3?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group