Re: plpgsql replication stored procedure

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: plpgsql replication stored procedure
Дата
Msg-id 4358.1145301707@sss.pgh.pa.us
обсуждение исходный текст
Ответ на plpgsql replication stored procedure  (aaron.clauson@gmail.com)
Ответы Re: plpgsql replication stored procedure  ("William Leite Araújo" <william.bh@gmail.com>)
Список pgsql-general
aaron.clauson@gmail.com writes:
> I'm trying to write a stored procedure that can capture all the changes
> to a table and record the changes based on the table's primary key.
> I can almost get there but the sticking point is being able to access
> the primary key field of the NEW/OLD record in the trigger stored
> procedure without knowing it's name.

There is no way to write such a generic trigger in plpgsql (and even if
you could, its performance would suck :-().  You could do it in C if
you're sufficiently determined.

            regards, tom lane

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: the integer type
Следующее
От: "Yudie Pg"
Дата:
Сообщение: tsearch partial word