Received: from mx99.openu.ac.il (arbel.openu.ac.il [147.233.32.4]) by hub.org (8.9.3/8.9.3) with ESMTP id IAA11453 for ; Sun, 6 Jun 1999 08:25:29 -0400 (EDT) (envelope-from herouth@oumail.openu.ac.il) Received: from talmon.openu.ac.il (talmon.openu.ac.il [147.233.32.11]) by mx99.openu.ac.il (Postfix) with ESMTP for id 0416A4B514; Sun, 6 Jun 1999 15:25:28 +0300 (IDT) Received: from [147.233.159.109] (mac-herouth.pc.openu.ac.il) by talmon.openu.ac.il (Netscape Messaging Server 3.54) with ESMTP id AAA1D45; Sun, 6 Jun 1999 15:28:03 +0300 X-Sender: herouth@shaked.cc.openu.ac.il Message-Id: In-Reply-To: <199906041721.NAA82580@hub.org> References: <3757CBD7.66FBE889@sferacarta.com> <199906041045.GAA67778@hub.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Sun, 6 Jun 1999 15:26:21 +0300 To: Martin Leja From: Herouth Maoz Subject: Re: [SQL] Howto convert floats to text? Cc: pgsql-sql@postgreSQL.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