Dropping and creating a trigger - Mailing list pgsql-general

From Mitar
Subject Dropping and creating a trigger
Date
Msg-id CAKLmikM3XbHJVRYcwLGAPknP5u6KfHjDinSpnrV07x46ozDwXw@mail.gmail.com
Whole thread Raw
Responses Re: Dropping and creating a trigger
Re: Dropping and creating a trigger
List 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


pgsql-general by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Get LSN at which a cluster was promoted on previous timeline
Next
From: Ron
Date:
Subject: Re: Dropping and creating a trigger