PostgreSQL/Store Procedure Function/Drop Function

Материал из SQL эксперт
Версия от 13:14, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

Drop a function

   <source lang="sql">

postgres=# CREATE FUNCTION "test" (integer) RETURNS integer AS " postgres"# postgres"# DECLARE postgres"# variable ALIAS FOR $1; postgres"# BEGIN postgres"# return variable * 2; postgres"# END; postgres"# " LANGUAGE "plpgsql"; CREATE FUNCTION postgres=# postgres=# select test(1);

test

   2

(1 row) postgres=# postgres=# drop function test(integer); DROP FUNCTION postgres=# postgres=#

      </source>