query: refactor generation of fail triggers
query: refactor generation of fail triggers

The triggers for postgre are generated multi-lined. This is
not acceptable for using isql. To simplify adaptation to isql,
refactor the templates.

Signed-off-by: Jan Viktorin <3eab6ac54c005c4408f608556a6663b7f2abede7@fit.vutbr.cz>

BeeeOn/server,BeeeOn/server,BeeeOn/server,BeeeOn/server