From: | Sibtay Abbas <sibtay(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | passing parameters by reference |
Date: | 2005-02-11 11:24:59 |
Message-ID: | bd6a35510502110324a412849@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Zeugswetter Andreas DAZ SD | 2005-02-11 11:44:09 | Re: New form of index "persistent reference" |
Previous Message | Hubert Fröhlich | 2005-02-11 10:58:16 | WARNING: could not remove database directory |