Trouble with CREATE FUNCTION
От
S Bey
Тема
Trouble with CREATE FUNCTION
Дата
Msg-id
Pine.LNX.4.30.0102162021570.17254-100000@cslin050
Список
Дерево обсуждения
Trouble with CREATE FUNCTION S Bey <iszsb@comp.leeds.ac.uk>
Re: Trouble with CREATE FUNCTION Jie Liang <jliang@ipinc.com>
Dear All, I have tried creating a function as follows: CREATE FUNCTION chkTelephone () RETURNS OPAQUE AS ' BEGIN IF EXISTS (SELECT * FROM tenant t WHERE t.areacode = NEW.areacode AND t.telephone = NEW.telphone) THEN RAISE EXCEPTION ''THAT TELEPHONE NUMBER ALREADY EXISTS!''; END IF; RETURN NEW; END; ' LANGUAGE 'plpgsql'; However I get the following error: ERROR: Unrecognized language specified in a CREATE FUNCTION: 'plpgsql'. Recognized languages are sql, C, internal and the created procedural languages. In the documentation it states that 'PL/pgSQL is a loadable procedural language for the Postgres database system.'. Where can I load it from and are there any other problems that may arise? Cheers, Steve.
В списке pgsql-sql по дате отправления