Re: trouble with triggers

Поиск
Список
Период
Сортировка
От Fran Fabrizio
Тема Re: trouble with triggers
Дата
Msg-id 3B54562A.D31A3B79@mmrd.com
обсуждение исходный текст
Ответ на trouble with triggers  ("Robert Treat" <robertt@auctionsolutions.com>)
Ответы RE: trouble with triggers  ("Robert Treat" <robertt@auctionsolutions.com>)
Список pgsql-general
>
> CREATE TRIGGER formatname BEFORE update OR insert ON mytable FOR EACH row
> EXECUTE PROCEDURE lower(name);

The way I understand it, you can't just use any function as a trigger.  It has
to have a return type of opaque.  I see that you are basically trying to
convert to lowercase before inserting, but I'm pretty sure you'd have to define
your own pgplsql function for the trigger which uses the special variable 'new'
to access the incoming row.  Your function can call lower() of course.

Others here can probably give you more details.

-Fran




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

Предыдущее
От: ryan.a.roemmich@mail.sprint.com
Дата:
Сообщение: RE: Postmaster won't start.
Следующее
От: Ryan Mahoney
Дата:
Сообщение: Re: How to find out the weekday from a date???