I have an error I'm trying to debug in a trigger function. In the Postgres log, I have the following:
2012-08-16 21:41:23 PDT ERROR: Unknown period: D
2012-08-16 21:41:23 PDT CONTEXT: PL/pgSQL function "handle_promotion_update"
line 60 at assignment
SQL statement "UPDATE promotion SET some_column = foo + 1
WHERE id = NEW.promotion_id"
PL/pgSQL function "handle_new_reward" line 94 at SQL statement
So, it seems like my problem probably starts at "line 60"
My question, is where do the line numbers start? If I go in pgAdmin and look at the function declaration it has "helper" (like delete function) at the top. So, I don't think it's from there. But, does it include the function declaration? Or is it just from the line with BEGIN
?