how to get id of currently executed query?
| От | hubert depesz lubaczewski |
|---|---|
| Тема | how to get id of currently executed query? |
| Дата | |
| Msg-id | 20070816113011.GA15919@depesz.com обсуждение |
| Ответы |
Re: how to get id of currently executed query?
|
| Список | pgsql-general |
hi, i need something to distinguish two separate calls for some select. i tried to use c functions GetCurrentTransactionId() and GetCurrentCommandId(), but there is a problem: if i'll make plpgsql function, which uses GetCurrentTransactionId() and GetCurrentCommandId() - getCurrentCommandId changes ( sql's from functions also increment the command-id-counter). so my question is - is there any way, to be able to tell "one query from another"? i would like to write a plpgsql function that would be able to differentiate somehow it's calls from one statement to another. i'm not sure if my description is correct - if you dont understand something, please let me know. depesz -- quicksil1er: "postgres is excellent, but like any DB it requires a highly paid DBA. here's my CV!" :) http://www.depesz.com/ - blog dla ciebie (i moje CV)
В списке pgsql-general по дате отправления: