Search Postgresql Archives

Insert/Update/Delete views with INSTEAD OF

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

Does anyone have any recommendations on how to migrate Oracle's
'INSTEAD OF' triggers to PostgreSQL's 'INSTEAD OF' rules?

What I would like to do are:

- When there's an insert to the view, the rule would insert the data
into many tables.
- When there's an update, the rule would insert and update data across tables.
- When there's a delete, update fields in some tables.

I have been trying to use INSTEAD OF rules on these tables and SELECT
the functions to do all the work. The problem is the INSTEAD OF rule
doesn't return the command status when it selects the function. As a
result of this, Hibernate (ORM framework) returns exception because it
expects the command to return the status.

Could someone points me to the right direction, or it's not possible
to do this in PostgreSQL?

Regards,
Ben

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux