| From: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> |
|---|---|
| To: | daniel(dot)cruz(at)sistemafiesc(dot)com(dot)br |
| Cc: | DANIEL CRISTIAN CRUZ <daniel(dot)cruz(at)sc(dot)senai(dot)br>, pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Is there a way to add a detail message in a warning with pl/Python? |
| Date: | 2013-01-29 19:30:21 |
| Message-ID: | 5108234D.8010100@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On 01/29/2013 05:03 AM, DANIEL CRISTIAN CRUZ wrote:
> Hello,
>
> I build a function and added some warnings where the id of the affected
> rows are inside it; and would be nice to put it into a detail, not in
> the message, since pgbadger can group it and I can see clearly what is
> wrong in my cluster.
>
> I read the manual and tried something with no success:
>
> plpy.warning('test', 'detail') -> output both values
> plpy.warning({'message': 'test', 'detail': 'detail'}) -> output the dict
> plpy.warning('test', detail='detail') -> fail
>
> Am I missing something?
Why not:
DO $$
plpy.warning('test, detail')
$$ LANGUAGE plpythonu;
In log:
WARNING: test, detail
>
> I would read the code, but I had no time right now...
>
> Thanks,
>
--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kevin Grittner | 2013-01-29 23:09:26 | Re: Optimizing select count query which often takes over 10 seconds |
| Previous Message | yatler sahri | 2013-01-29 18:12:56 |