Retrieving variable names from ids in pl_exec.c

Поиск
Список
Период
Сортировка
Искать

Retrieving variable names from ids in pl_exec.c

От:
Dimitris Karampinas <dkarampin@gmail.com>
Дата:
Hello,

Is there any way to retrieve the actual variable names (as were given 
during Stored Procedure definition) for the corresponding var_ids in 
pl/plpgsql/src/pl_exec.c ?
I have modified some PostgreSQL code for my own project and I track some 
information for functions during their execution. It would be much more 
clear at the end if I could map variable ids to their actual names.

Thanks in advance

Re: Retrieving variable names from ids in pl_exec.c

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Dimitris Karampinas  writes:
> Is there any way to retrieve the actual variable names (as were given 
> during Stored Procedure definition) for the corresponding var_ids in 
> pl/plpgsql/src/pl_exec.c ?

As of 9.0, you could dig through the namespace stack looking for a
match to the dno (datum number).  In earlier releases, no chance because
that data structure wasn't kept around after compile.
		regards, tom lane

FAQ