Обсуждение: plpgsql
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 Eduardo B. L. e Carvalho Development/Consultant
feblec wrote: >consultas=# CREATE FUNCTION spread(text) ... >consultas-# LANGUAGE 'plpgsql'; >ERROR: Unrecognized language specified in a CREATE >FUNCTION: 'plpgsql'. Recognizedlanguages are sql, C, internal and the >created procedural languages. create function plpgsql_call_handler() returns opaque as '/usr/local/pgsql/lib/plpgsql.so' <-- or wherever language 'C'; create trusted procedural language 'plpgsql' handler plpgsql_call_handler lancompiler 'PL/pgSQL'; -- Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight http://www.lfix.co.uk/oliver PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47 GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C ======================================== "Be of good courage, and he shall strengthen your heart, all ye that hopein the LORD." Psalms 31:24
On Sat, Dec 09, 2000 at 08:16:06AM +0000, feblec wrote: > FUNCTION: 'plpgsql'. Recognized languages are sql, C, internal and the > created procedural languages. Look at: postgresql-7.0.3/src/pl/plpgsql/enable_plpgsql mrc -- Mike Castle Life is like a clock: You can work constantly dalgoda@ix.netcom.com and be right all the time,or not work at all www.netcom.com/~dalgoda/ and be right at least twice a day. -- mrc We are all of us living in the shadow of Manhattan. -- Watchmen