4 ms·
Python 3 can be executed server side by Postgres as well CREATE FUNCTION pymax (a integer, b integer) RETURNS integer AS $$ if a > b: return
by orangepurple 4y ago
Python 3 can be executed server side by Postgres as well
CREATE FUNCTION pymax (a integer, b integer)
RETURNS integer
AS $$
if a > b:
return a
return b
$$ LANGUAGE plpython3u;
https://www.postgresql.org/docs/current/plpython.html https://www.postgresql.org/docs/current/plpython.html
- waynehn 4y agoActually Postgres does it better. Greptime only supports writing Python logic as a post cooprocessor for now, but not as an in-query function. We are trying to evolve towards the Postgres' functionality you mention.
- VWWHFSfQ 4y agoPython running in Postgres sounds like it would be unusably slow. What's the performance like?
- orangepurple 4y agoI have no idea who uses it.