pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Dropping and creating a trigger
Date: Sat, 5 Jan 2019 04:16:06 -0600
Message-ID: <46b0ab1f-d072-43d1-603b-d3b18f24028a@gmail.com> (raw)
In-Reply-To: <CAKLmikM3XbHJVRYcwLGAPknP5u6KfHjDinSpnrV07x46ozDwXw@mail.gmail.com>
References: <CAKLmikM3XbHJVRYcwLGAPknP5u6KfHjDinSpnrV07x46ozDwXw@mail.gmail.com>

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.




view thread (4+ messages)  latest in thread

Message-ID: <46b0ab1f-d072-43d1-603b-d3b18f24028a@gmail.com>
Permalink:  ../46b0ab1f-d072-43d1-603b-d3b18f24028a@gmail.com/
Also on:    postgresql.org/message-id/46b0ab1f-d072-43d1-603b-d3b18f24028a@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: ronljohnsonjr@gmail.com
  Subject: Re: Dropping and creating a trigger
  In-Reply-To: <46b0ab1f-d072-43d1-603b-d3b18f24028a@gmail.com>
  References: <CAKLmikM3XbHJVRYcwLGAPknP5u6KfHjDinSpnrV07x46ozDwXw@mail.gmail.com> <46b0ab1f-d072-43d1-603b-d3b18f24028a@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox