user3555572
user3555572

Reputation: 239

is it possible to create trigger without execute procedure in postgresql?

i want to create procedure with BL in its body. i find the same example in SQL but not in postgresql.

Upvotes: 19

Views: 7439

Answers (2)

M Faisal Hameed
M Faisal Hameed

Reputation: 713

Every RDBMS have their own SQL language. You can't create trigger in PostgreSQL as you can create in Oracle/MS SQL etc. In order to create trigger in PostgreSQL you have to

  1. Create a function in PostgreSQL with you BL
  2. Create a trigger and associate your function with this trigger.

Upvotes: 21

Pavel Stehule
Pavel Stehule

Reputation: 45940

It is not possible - PostgreSQL doesn't support SQL triggers - every trigger needs a related trigger function. Other databases supports SQL triggers only, but not PostgreSQL.

Upvotes: 7

Related Questions