pl/pgsql noob

Поиск
Список
Период
Сортировка
От Don Patou
Тема pl/pgsql noob
Дата
Msg-id 200306011912.09344.pknoob@noos.fr
обсуждение исходный текст
Список pgsql-novice
I wanna use a function as a column default value. the problem is that I don't
know how to use a function as a default value (how to call it) and that my
function ain't working properly. so here is my function:

CREATE FUNCTION myfunction() RETURNS trigger AS '
    BEGIN
select count(episode.show_name) from episode where
episode.show_name=show.show_name;
return countshow;
end;
' LANGUAGE plpgsql;

this function is a query that counts how many show_name are in the table
episode, show_name is a foreign key from table show. the result is suppose to
go in the column count_show in table show.

thanx in advance

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

Предыдущее
От: Frank Bax
Дата:
Сообщение: Re: Me again..nOOb alert
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Me again..nOOb alert