Re: Function won't compile

Поиск
Список
Период
Сортировка
Искать
От
Dr. Evil
Тема
Re: Function won't compile
Дата
Msg-id
20011024214229.14212.qmail@sidereal.kz
Ответ на
Function won't compile (Joop van Bussel)
Список
Дерево обсуждения
Function won't compile "Joop van Bussel" <jvbussel@natlab.research.philips.com>
Re: Function won't compile "Dr. Evil" <drevil@sidereal.kz>
Re: Function won't compile "Aasmund Midttun Godal" <postgresql@envisity.com>
Re: Function won't compile Stephan Szabo <sszabo@megazone23.bigpanda.com>
Re: Function won't compile Tom Lane <tgl@sss.pgh.pa.us>

> Does anybody know why the function insert_case() won't compile. When I
> INSERT a new record I always get the following error message :
> 
> NOTICE:  plpgsql: ERROR during compile of insert_case near line 1
> "RROR:  parse error at or near "
> 
> Below is the function and trigger. ('Now' is surrounded with single quotes)
> 
> CREATE FUNCTION insert_case () RETURNS INTEGER AS '
>   BEGIN
>     NEW.date_created := ''now'';
>   END;
> ' LANGUAGE 'SQL';

Very simple!  You don't use BEGIN and END within a LANGUAGE 'sql'
function.  You are mixing up sql with plpgsql.

В списке pgsql-general по дате отправления
От: Haroldo Stenger
Дата:
Сообщение: Re: database development
От: Guy Fraser
Дата:
Сообщение: Re: WWW interface for postgres
FAQ