Unable to drop trigger in PostgreSQL during syncrhonization

PostgreSQL - related issues
Post Reply
petr.fedorov
Posts: 32
Joined: Sun Aug 19, 2012 8:57 am
Location: Russia

Unable to drop trigger in PostgreSQL during syncrhonization

Post by petr.fedorov » Mon Feb 04, 2013 5:31 pm

The statement to drop trigger in Databases->Database Settings, Statements, Function or Procedure, Drop is wrong. Currently, it is "DROP {type} {name} " while PostgreSQL syntax for "DROP TRIGGER" statement is: DROP TRIGGER {name} ON {table}.

Thus, Drop trigger statements which are generated during syncrhonization have wrong syntax.

donose.mihai
Posts: 470
Joined: Thu Apr 07, 2011 11:05 am

Re: Unable to drop trigger in PostgreSQL during syncrhonizat

Post by donose.mihai » Wed Feb 06, 2013 9:48 am

Noted,

Thanks for letting us know.

petr.fedorov
Posts: 32
Joined: Sun Aug 19, 2012 8:57 am
Location: Russia

Re: Unable to drop trigger in PostgreSQL during syncrhonizat

Post by petr.fedorov » Sun Feb 10, 2013 8:33 am

But are you going to fix it or not? Will you open Issue for that? It is really annoying - we have very many triggers and they always shown as different during synchronization and I can not update databse from .dbs.

donose.mihai
Posts: 470
Joined: Thu Apr 07, 2011 11:05 am

Re: Unable to drop trigger in PostgreSQL during syncrhonizat

Post by donose.mihai » Mon Feb 11, 2013 8:58 am

Yes, it's going to get fixed, Issue ID: 0001434

petr.fedorov
Posts: 32
Joined: Sun Aug 19, 2012 8:57 am
Location: Russia

Re: Unable to drop trigger in PostgreSQL during syncrhonizat

Post by petr.fedorov » Wed Aug 07, 2013 3:27 am

Still does not work but for the different reason now: the name of a trigger in the DROP statement is qualified with a schema name while PostgreSQL does not allow to do so. A schema for a triger is inherited from a trigger's table. Triggers are 'local' to tables in PostgreSQL, this is a deviation from SQL standard.

Currently DbSchema generates the following code:

Code: Select all

DROP TRIGGER schema.trigger_name ON schema.table_name
And it has to generate the following:

Code: Select all

DROP TRIGGER trigger_name ON schema.table_name

donose.mihai
Posts: 470
Joined: Thu Apr 07, 2011 11:05 am

Re: Unable to drop trigger in PostgreSQL during syncrhonizat

Post by donose.mihai » Fri Aug 09, 2013 4:51 am

I've reopened the issue.

donose.mihai
Posts: 470
Joined: Thu Apr 07, 2011 11:05 am

Re: Unable to drop trigger in PostgreSQL during syncrhonizat

Post by donose.mihai » Mon Dec 09, 2013 9:06 am

Fixed

austingrd
Posts: 50
Joined: Sat Aug 24, 2013 3:03 pm

Re: Unable to drop trigger in PostgreSQL during syncrhonizat

Post by austingrd » Sat Dec 28, 2013 6:01 pm

Thanks for confirming this. Is there a patch or an upgrade that a user needs to do to apply the fix? Or are there steps available for this?

Post Reply