From: Aaron Trevena Date: Sat, 13 Jun 2009 19:29:15 +0000 (+0000) Subject: fixed triggers X-Git-Tag: v0.11008~149 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=30d75308a9081fafb4a5a8dfa36828381e5fda9c;p=dbsrgits%2FSQL-Translator.git fixed triggers --- diff --git a/lib/SQL/Translator/Producer/PostgreSQL.pm b/lib/SQL/Translator/Producer/PostgreSQL.pm index aa17064..d86ab4c 100644 --- a/lib/SQL/Translator/Producer/PostgreSQL.pm +++ b/lib/SQL/Translator/Producer/PostgreSQL.pm @@ -261,7 +261,7 @@ sub produce { push (@output, join("\n\n", @comments, $procedure->sql(), - )); + ), "\n"); } @@ -673,7 +673,7 @@ sub create_trigger { my ($trigger) = @_; # CREATE TRIGGER tree_change_trig BEFORE DELETE or INSERT or UPDATE ON type FOR EACH ROW EXECUTE PROCEDURE type_tree_change(); my $db_events = join ' or ', $trigger->database_events; - my $out = sprintf('CREATE TRIGGER %s %s %s ON %s', + my $out = sprintf('CREATE TRIGGER %s %s %s ON %s %s', $trigger->name, $trigger->perform_action_when || 'AFTER', $db_events,