passing parameters by reference

Поиск
Список
Период
Сортировка
От Sibtay Abbas
Тема passing parameters by reference
Дата
Msg-id bd6a35510502110324a412849@mail.gmail.com
обсуждение исходный текст
Ответы Re: passing parameters by reference  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
hello all

as i have mentioned this before, as part of my academic project
i am required to make modifications in postgresql.

One of my tasks includes allowing plpgsql functions to pass parameters by
reference. For this purpose I have been digging in the code for plpgsql 
and postgresql for 2 days now but i am not able to find any thing tangible.

The first thing which i would love to clarify and would be very gratefull if
anyone can help me in this, is that to achieve this am i required to
make modifications
in plpgsql or postgresql codebase itself?

To achieve this my first approach was to make modifications in
function call manager where we fill the
FmgrInfo and FunctionCallInfo structures for a function. There we can
get the references of the Datums actually
passed and assign it to fcinfo.arg[0]

(i am refering to the "Datum DirectFunctionCall1(PGFunction func,
Datum arg1)" function in fmgr.c and i am quite
sure that this approach is wrong)

If anyone can point out the area (in terms of functions or .c files)
where i should start
doing my research in this context it would do wonders to me.

Thank you


P.S : I have discovered that you cannot assign values to function
parameters inside the function,
but i have managed to get pass this restriction by setting the
"isconst" field of function parameters
to false, in the "do_compile" function of plpgsql. This way users will
have write access
to function parameters.


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jaime Casanova
Дата:
Сообщение: prev main developer page
Следующее
От: "Zeugswetter Andreas DAZ SD"
Дата:
Сообщение: Re: New form of index "persistent reference"