Segfault-Inc / Multicorn

Data Access Library
https://multicorn.org/
PostgreSQL License
697 stars 145 forks source link

Call plpython inline #249

Open rbiro opened 4 years ago

rbiro commented 4 years ago

I think this is a less hacky way to initialize plpython and multicorn at the same time. Basically, it just calls plpython_inline_handler and asks it to eval pass.

To do this, we have to initialize things later than in the past.

This opens the door to creating a utils.plpy_eval function that will run python inside the plpython context for light weight calls to plpython. We will also be able to setup a trampline via python to wrap the multicorn entry points for a more heavyweight way to guarantee we have the appropriate context for plpy functions to work.

Comments, suggestions?