Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

A while ago I've created a trigger in Postgresql, update_user, which sets the update_date to now() for table users. Now I want to drop this trigger.

The following queries don't work:

drop trigger update_user;
drop trigger update_user on users;

I get the following error back:

ERROR:  syntax error at or near ";"

How can I drop this trigger?

share|improve this question

closed as too localized by dezso, RolandoMySQLDBA, StanleyJohns, Mat, Marian May 20 '13 at 10:12

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

4  
drop trigger triggername on tablename; should work... How odd. –  Phil May 19 '13 at 18:23

1 Answer 1

I made a connection using pgadmin, and then dropped the trigger. The problem was I can only use ssh to connect to the server, and I didn't know how to make that connection at first. I've just found a way to tunnel the connection via ssh.

ssh -fNg -L 5555:localhost:5432 {username}@{domain.com}
share|improve this answer
    
You can also just ssh username@domain.com psql to run psql directly on the remote host. Much more convenient than an ssh tunnel. –  Craig Ringer May 19 '13 at 23:49
1  
But how is this connected to the syntax error? –  dezso May 20 '13 at 9:52

Not the answer you're looking for? Browse other questions tagged or ask your own question.