1

I have written for preventing a update using trigger function in pgsql.

Here lamtapproved is the column for which i want to stop an update

    create or replace function Prevent_update() returns trigger as $$
    begin
    if new.lamtapproved=old.lamtapproved

    then raise exception 'Update is not allowed';
    end if;

    return new;
    end;
    $$ language 'plpgsql'

Using the above trigger function i want to prevent the updates in the

bguiz
  • 27,371
  • 47
  • 154
  • 243

0 Answers0