PostgreSQL triggers in rails app? How to execute "createlang plpgsql database_name"?
If I am going to use postgres triggers in a rails app, I can use execute { 开发者_开发问答create trigger } for creating a trigger in migration file. But where am I supposed to write these lines? createlang plpgsql databasename;
Use the SQL execute("CREATE LANGUAGE plpgsql") instead, and put this statement in your standard migration.
精彩评论