Re: COPY FROM and INSERT INTO rules

Поиск
Список
Период
Сортировка
От Brent Wood
Тема Re: COPY FROM and INSERT INTO rules
Дата
Msg-id 4CFE631B0200007B000341F6@gwia.niwa.co.nz
обсуждение исходный текст
Ответ на COPY FROM and INSERT INTO rules  (Sairam Krishnamurthy <kmsram420@gmail.com>)
Список pgsql-general

From the 8.3 docs...

"Be aware that COPY ignores rules. ... COPY does fire triggers, so you can use it normally if you use the trigger approach."

HTH,

 Brent Wood


All,

I have a rule written on a temp table which will copy the values inserted into it to another table applying a function. The temp table will be discarded then. The rules I have written works when I use "Insert into" the temp table. But when I use bulk copy "COPY FROM", the rule doesn't get triggered and data is inserted only into the temp table that I created.

Is there a way to call a rule when I use "COPY FROM" instead of "INSERT INTO"

TIA,
Sairam

Brent Wood
DBA/GIS consultant
NIWA, Wellington
New Zealand


Please consider the environment before printing this email.

NIWA is the trading name of the National Institute of Water & Atmospheric Research Ltd.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Do we want SYNONYMS?
Следующее
От: Craig Ringer
Дата:
Сообщение: Type cast removal - proposed exceptions for xml,enum