From: Herouth Maoz <herouth@oumail.openu.ac.il>
To: Martin Leja <martin@unix-ag.org>
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] Howto convert floats to text?
Date: Sun, 6 Jun 1999 15:26:21 +0300
Message-ID: <l03130305b38017f776fa@[147.233.159.109]> (raw)
In-Reply-To: <199906041721.NAA82580@hub.org>
References: <3757CBD7.66FBE889@sferacarta.com>
<199906041045.GAA67778@hub.org>
At 20:22 +0300 on 04/06/1999, Martin Leja wrote:
>
> Thanks for the tip, but if i try the above, i get:
> ERROR: Unrecognized language specified in a CREATE FUNCTION: 'plpgsql'.
> Recognized languages are sql, C, internal and the created procedural
> languages.
>
> what is pl/pgsql? I using postgres 6.3.2 (slink/stable debian package), do
> i hve to upgrade to a higer version, or is this plpgsql thing to be
> installed separately?
pl/pgsql is new in 6.4. If you are working with 6.3.2, you may define a
function in SQL as follows:
testing=> CREATE FUNCTION text( float8 ) returns text
testing-> AS 'select textin( float8out( $1 ) )'
testing-> LANGUAGE 'sql';
Test this:
testing=> select text( 18.4 ) || ' is the number';
?column?
------------------
18.4 is the number
(1 row)
Herouth
--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma
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, martin@unix-ag.org
Subject: Re: [SQL] Howto convert floats to text?
In-Reply-To: <l03130305b38017f776fa@[147.233.159.109]>
References: <3757CBD7.66FBE889@sferacarta.com> <199906041045.GAA67778@hub.org> <l03130305b38017f776fa@[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