Plpgsql

From: feblec <carvalho(at)ig(dot)com(dot)br>
To: pgsql-sql(at)postgresql(dot)org
Subject: Plpgsql
Date: 2000-12-12 13:30:15
Message-ID: Pine.LNX.4.21.0012121327050.1048-100000@s1.carvalho.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


consultas=# CREATE FUNCTION spread(text)
consultas-# RETURNS text
consultas-# AS 'DECLARE
consultas'# str text;
consultas'# ret text;
consultas'# i integer;
consultas'# len integer;
consultas'# BEGIN
consultas'# str := upper($1);
consultas'# ret := ''''; -- start with zero length
consultas'# i := 1;
consultas'# len := length(str);
consultas'# WHILE i <= len LOOP
consultas'# ret := ret || substr(str, i, 1) || '' '';
consultas'# i := i + 1;
consultas'# END LOOP;
consultas'# RETURN ret;
consultas'# END;'
consultas-# LANGUAGE 'plpgsql';
ERROR: Unrecognized language specified in a CREATE
FUNCTION: 'plpgsql'. Recognized languages are sql, C, internal and the
created procedural languages.

consultas=# select version();
version
-------------------------------------------------------------
PostgreSQL 7.0.3 on i686-pc-linux-gnu, compiled by gcc 2.96
(1 row)

--

Fernando Edurado B. L. e Carvalho
Development/Consultant

Browse pgsql-sql by date

  From Date Subject
Next Message Nikhil G. Daddikar 2000-12-12 14:20:03 Decimal vs.Numeric vs. Int & type for OID
Previous Message Kenn Thompson 2000-12-12 11:37:44 RE: SQL parse error