pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Herouth Maoz <herouth@oumail.openu.ac.il>
To: Remigiusz Sokolowski <rems@gdansk.sprint.pl>
To: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] converting from number to text
Date: Wed, 16 Jun 1999 14:25:06 +0300
Message-ID: <l03130302b38d2f49cbcc@[147.233.159.109]> (raw)
In-Reply-To: <Pine.GS4.4.02A.9906161125380.13802-100000@netra.gdansk.sprint.pl>

At 12:31 +0300 on 16/06/1999, Remigiusz Sokolowski wrote:


> I need convert number(float or integer) to text, but my version of
> postgres (i.e. 6.3.2) seems to have not such a function?
> Is it may be in newer versions or is there any work-around?
> TIA
> 	Rems
> p.s. concept is to have field, which contain date in timestamp form
> (number of seconds from 'epoch'), but in which I could insert also value
> 'until cancellation' or any other text.

I think a better approach to your problem would be to add a status field.
The status field will contain anysuch additional information, and the date
field will only contain a date when the given status demands it. How you
display it in a report is a different matter - You can write a function
that queries the status field and substitutes it with the date value if the
status is so-and-so.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma





view thread (4+ messages)  latest in thread

Message-ID: <l03130302b38d2f49cbcc@[147.233.159.109]>
Permalink:  ../l03130302b38d2f49cbcc@%5B147.233.159.109%5D/
Also on:    postgresql.org/message-id/l03130302b38d2f49cbcc@[147.233.159.109]

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: herouth@oumail.openu.ac.il, rems@gdansk.sprint.pl
  Subject: Re: [SQL] converting from number to text
  In-Reply-To: <l03130302b38d2f49cbcc@[147.233.159.109]>
  References: <Pine.GS4.4.02A.9906161125380.13802-100000@netra.gdansk.sprint.pl> <l03130302b38d2f49cbcc@[147.233.159.109]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox