Peter Eisentraut <[EMAIL PROTECTED]> writes:
> Couldn't the function handler detoast the values before handing them to
> the function? That would be slower, but it would allow people to continue
> to use the "simpler" interface.
This would be a moderately expensive thing to do --- not impossible,
but relatively expensive. The old-style function handler would need
to look up all the function-argument datatypes during fmgr_info()
so that it could save a bool array telling it which argument positions
need detoasting. (You can't just detoast every Datum --- you have to
at least verify that it's of a varlena type first.)
On a per-invocation basis, however, it probably wouldn't be very costly.
I didn't want to do this during development, but now that there are no
more old-style internal functions left, I suppose you could make a good
argument that this is worth doing for old-style dynamically loaded
functions. Will put it on the to-do list.
Are people satisfied with the notion of requiring an info function
to go with each dynamically loaded new-style function? If so, I'll
start working on that too.
regards, tom lane
- Re: [HACKERS] Coping with 'C' vs 'newC' function language... Philip Warner
- Re: [HACKERS] Coping with 'C' vs 'newC' function lan... Tom Lane
- Re: [HACKERS] Coping with 'C' vs 'newC' function... Marko Kreen
- Re: [HACKERS] Coping with 'C' vs 'newC' func... Bruce Momjian
- Re: [HACKERS] Coping with 'C' vs 'newC' ... Philip Warner
- Re: [HACKERS] Coping with 'C' vs 'newC' function... Philip Warner
- Re: [HACKERS] CREATE MODULE (was: Coping with 'C... Mark Hollomon
- Re: [HACKERS] CREATE MODULE (was: Coping wit... Philip Warner
- Re: [HACKERS] Coping with 'C' vs 'newC' function language... Jan Wieck
- Re: [HACKERS] Coping with 'C' vs 'newC' function lan... Peter Eisentraut
- Re: [HACKERS] Coping with 'C' vs 'newC' function... Tom Lane
- Re: [HACKERS] Coping with 'C' vs 'newC' func... Bruce Momjian
- Re: [HACKERS] Coping with 'C' vs 'newC' ... Tom Lane
- Re: [HACKERS] Coping with 'C' vs 'newC' ... Thomas Lockhart
- Re: [HACKERS] Coping with 'C' vs 'newC' ... Bruce Momjian
- Re: [HACKERS] Coping with 'C' vs 'newC' ... Hannu Krosing
- Re: [HACKERS] Coping with 'C' vs 'newC' ... Bruce Momjian
- Re: [HACKERS] Coping with 'C' vs 'newC' function lan... Tom Lane
