Dropping and creating a trigger

From: Mitar <mmitar(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Dropping and creating a trigger
Date: 2019-01-05 09:59:06
Message-ID: CAKLmikM3XbHJVRYcwLGAPknP5u6KfHjDinSpnrV07x46ozDwXw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi!

I am seeing such errors in logs:

ERROR: trigger "myapp_assignments" for relation "assignments" already exists
STATEMENT:
BEGIN TRANSACTION;
DROP TRIGGER IF EXISTS "myapp_assignments" ON "assignments";
CREATE TRIGGER "myapp_assignments"
AFTER INSERT OR UPDATE OR DELETE ON "assignments"
FOR EACH ROW EXECUTE PROCEDURE "tblobs_myapp"();
COMMIT;

How is this possible? If I am inside a transaction, this should work, no?

Mitar

--
http://mitar.tnode.com/
https://twitter.com/mitar_m

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2019-01-05 10:16:06 Re: Dropping and creating a trigger
Previous Message Michael Paquier 2019-01-05 03:54:42 Re: Get LSN at which a cluster was promoted on previous timeline