Re: plpgsql merge func question
От | Andreas Kretschmer |
---|---|
Тема | Re: plpgsql merge func question |
Дата | |
Msg-id | 20131220124233.GA28530@tux обсуждение исходный текст |
Ответ на | plpgsql merge func question (Matthias Leopold <matthias@aic.at>) |
Ответы |
Re: plpgsql merge func question
|
Список | pgsql-novice |
Matthias Leopold <matthias@aic.at> wrote: > hi, > > i tried to write a merge function in plpgsql, which is derived from the > example in the docs (Example 38-2 in > http://www.postgresql.org/docs/8.4/static/plpgsql-control-structures.html). > Code is below. This works fine as long as entries in count_table have > todays date in "datum". when i have older entries the function "locks > up" (doesn't return, server has 100% cpu). i'm a plpgsql novice. can > someone explain why this happens? related question: i didn't find a way Can't reproduce, works for me. > to log queries that happen inside functions. is this possible? > > postgres version is 8.4.17 You should update, i'm using 9.3, it's possible with http://www.postgresql.org/docs/9.3/interactive/auto-explain.html and set auto_explain.log_nested_statements = on; I don't know if 8.3 contains auto-explain. Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) "If I was god, I would recompile penguin with --enable-fly." (unknown) Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°
В списке pgsql-novice по дате отправления: