Re: Stored Procedure Newbie

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Stored Procedure Newbie
Дата
Msg-id 15799.994805348@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Stored Procedure Newbie  (chaconeric@hotmail.com (Eric Chacon))
Список pgsql-general
chaconeric@hotmail.com (Eric Chacon) writes:
> CREATE FUNCTION update_flag_func()
> RETURNS text
> AS 'UPDATE update_flag SET content=current_timestamp;'
> LANGUAGE 'plpgsql';

> What obvious thing am I missing?

plpgsql wants BEGIN and END decoration around the procedure body.
The example would work as-is (I think) if you said LANGUAGE 'sql'.

            regards, tom lane

В списке pgsql-general по дате отправления: