Re: Dropping and creating a trigger

Поиск
Список
Период
Сортировка
От Ron
Тема Re: Dropping and creating a trigger
Дата
Msg-id 46b0ab1f-d072-43d1-603b-d3b18f24028a@gmail.com
обсуждение исходный текст
Ответ на Dropping and creating a trigger  (Mitar <mmitar@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Mitar
Дата:
Сообщение: Dropping and creating a trigger
Следующее
От: Alexander Farber
Дата:
Сообщение: Adding LEFT JOIN to a query has increased execution time 10 times