I may be new to triggers, but I think that I've managed to figure out how to
write one properly with plpgsql and it works even... when I copy/paste the SQL
into psql client window.
However, when I put the aforementioned SQL into a .sql file and run syncdb, I
run into:
Installing custom SQL for nodes.Node model
Failed to install custom SQL for nodes.Node model: unterminated dollar-quoted
string at or near "$compile_events$
BEGIN
IF (TG_OP = 'DELETE') THEN
DELETE
FROM
nodes_feed
WHERE
node_id = OLD.node_ptr_id;"
LINE 3: ...LACE FUNCTION compile_events() RETURNS TRIGGER AS $compile_e...
Now my first option was to run this by my good and dear friend Google, who
pointed me to this two-year old mailing list message:
http://www.mail-archive.com/django...@googlegroups.com/msg20409.html
The solution there though was hacking core... so I'm hoping that there's been
some development in the past two years. Anyone care to help me out? Ideally,
I need the triggers to load after table creation, but before the fixtures are
run.