mozilla/socorro — pull request #1203 by peterbe (2013-04-25 16:31:03+00:00)
Title: bug 865691 - crontabber matviews should log possible output

@selenamarie or @rhelmer r?

FYI, I created some fake jobs that used this base class any the output looks like this:

```
2013-04-25 09:26:55,666 INFO - MainThread - Result from calling my_testing_backfill_procedure([datetime.date(2013, 4, 24)]): (True,)
2013-04-25 09:26:55,666 INFO - MainThread - Notices from calling my_testing_backfill_procedure([datetime.date(2013, 4, 24)]): ['NOTICE: I am a stored backfill procedure getting 2013-04-24 00:00:00+00\n']
```

and

```
2013-04-25 09:26:50,918 INFO - MainThread - Result from calling my_testing_procedure(): (False,)
2013-04-25 09:26:50,918 INFO - MainThread - Notices from calling my_testing_procedure(): ['NOTICE: Bla bla bla. I am a stored procedure\n']
```

Here are the functions I created if that helps:

```sql
CREATE OR REPLACE FUNCTION my_testing_procedure() RETURNS boolean
LANGUAGE plpgsql
AS $$
BEGIN
RAISE NOTICE 'Bla bla bla. I am a stored procedure';

RETURN false;
END; $$;

CREATE OR REPLACE FUNCTION my_testing_backfill_procedure(fromtime timestamp with time zone) RETURNS boolean
LANGUAGE plpgsql
AS $$
BEGIN
RAISE NOTICE 'I am a stored backfill procedure getting %',fromtime;

RETURN TRUE;
END; $$;
```