Ariel Grabijas
Ariel Grabijas

Reputation: 1512

Triggers on views in PostgreSQL 9.0

In PostgreSQL 9.1 it's simple:

CREATE TRIGGER koncerty_insert INSTEAD OF INSERT ON Koncerty FOR EACH ROW EXECUTE PROCEDURE koncerty_insert();

But now I have to create a trigger for view in PostgreSQL 9.0, I can no longer use INSTEAD OF.. In fact, as far as I know, I cant use triggers on views at all.

Is there a simple way to create a trigger for view?

Upvotes: 0

Views: 207

Answers (1)

Craig Ringer
Craig Ringer

Reputation: 324861

In PostgreSQL 9.0 you must use RULEs.

If at all possible, upgrade instead. Rules are surprisingly hard to get right.

Upvotes: 1

Related Questions