Re: In what range of the code can we read debug_query_string?
| От | Tom Lane |
|---|---|
| Тема | Re: In what range of the code can we read debug_query_string? |
| Дата | |
| Msg-id | 3389.1527257288@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | In what range of the code can we read debug_query_string? (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>) |
| Ответы |
Re: In what range of the code can we read debug_query_string?
|
| Список | pgsql-hackers |
Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp> writes:
> It is set for other kinds of message, (parse, bind, execute). I
> think fastpath, close, flush and sync don't need that. If it is
> reasonable to assume that we can see debug_query_string in the
> DESCRIBE path, the attached patch would work.
I think this patch is a bad idea. In the first place, debug_query_string
is generally understood as the current *client* command string, not
something internally generated. In the second place, it looks way too
easy for this to leave debug_query_string as a dangling pointer,
ie pointing at a dropped plancache entry.
There might be a case for providing some way to get at the current
actively-executing query's string, using a protocol that can deal
with nesting of execution. (This might already be more or less
possible via ActivePortal->sourceText, depending on what you think
the semantics ought to be.) But debug_query_string was never
intended to do that.
regards, tom lane
В списке pgsql-hackers по дате отправления: