If table have an inclusion with LIKE what happens to triggers?

Поиск
Список
Период
Сортировка
От Göran Hasse
Тема If table have an inclusion with LIKE what happens to triggers?
Дата
Msg-id CADGsKJE9XKXqqVDPDn55mezH8+nr3nLF-hGmbChJrCjeU9jR8Q@mail.gmail.com
обсуждение исходный текст
Ответы Re: If table have an inclusion with LIKE what happens to triggers?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-general
Hello,

If I have a small table with common fields

CREATE TABLE common_filelds
(
    created_timestamp timestamp,
    updated_timestamp timestamp
)

Then I put som triggers on those fields

CREATE OR REPLACE FUNCTION update_modified_timestamp_function() RETURNS trigger AS
$$
BEGIN
NEW.modified_timestamp := CURRENT_TIMESTAMP;
RETURN NEW;
END;
$$
LANGUAGE plpgsql VOLATILE;

CREATE TRIGGER common_field_update_triger
BEFORE UPDATE ON rscada.common_fields
FOR EACH ROW
EXECUTE PROCEDURE update_modified_timestamp_function();

And then include this in another table

CREATE TABLE venue
(
     name varchar default '',
     LIKE common_fields
)

The triggers is not executed.

Is there any way to inherit also
the triggers from the common_field table?

Or must I place triggers on all tables?

/Cordially yours

--
gorhas@gmail.com
Göran Hasse
Boo 229
715 91  ODENSBACKEN
Mob: 070-5530148

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

Предыдущее
От: PAWAN SHARMA
Дата:
Сообщение: PostgreSQL Client on SUSE Enterprise Linux Server 11.
Следующее
От: Jeremy Finzel
Дата:
Сообщение: Re: Dependency tree to tie type/function deps to a table