Re: Dropping and creating a trigger - Mailing list pgsql-general

From Ron
Subject Re: Dropping and creating a trigger
Date
Msg-id 46b0ab1f-d072-43d1-603b-d3b18f24028a@gmail.com
Whole thread Raw
In response to Dropping and creating a trigger  (Mitar <mmitar@gmail.com>)
List pgsql-general
On 1/5/19 3:59 AM, Mitar wrote:
> 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?

I'd think it should.  Have you run the commands manually, one at a time, 
from psql, and checking the table after the DROP TRIGGER, to verify that the 
trigger actually gets dropped?

-- 
Angular momentum makes the world go 'round.


pgsql-general by date:

Previous
From: Mitar
Date:
Subject: Dropping and creating a trigger
Next
From: Alexander Farber
Date:
Subject: Adding LEFT JOIN to a query has increased execution time 10 times