[GSoC 2021 PostgreSQL] 🐘 Create procedural language extension for the Julia programming language

NEWS: The PostgreSQL project has been added a Julia related GSoC 2021 project. (pl/Julia) :elephant: :julia:

" Create procedural language extension for the Julia programming language"

  • GSoC 2021 - PostgreSQL wiki
  • “pl/julia is the start of an extension to support the Julia programming language in PostgreSQL. While currently functional it has minimal support for writing user defined functions so additional functionality is needed to make the extension more useful.”
19 Likes

Awesome to see this and thanks for sharing!

@iamed2

Just in case anyone else is/was confused: This is about using julia in PostgreSQL syntax to create functions in SQL to be executed/called by PostgreSQL, not about a julia frontend to PostgreSQL (it clicked for me when I looked at return_integer.sql).

From what I can tell, this currently works by calling jl_init and jl_atexit_hook on each such function call, calling jl_eval_string in the process. Presumably, actually creating functions and using jl_call would be better (as the compiled code would be cached and parameters can be passed directly instead of through global variables as is done now), but this also requires to only call jl_init once, instead of on each function invocation.

Would be amazing to see though and a wonderful example on how to embed julia :slight_smile:

6 Likes

yes , thank you for extra information!

The “PL/Julia” is still missing from the “postgresql procedural languages list” :

  • PL/pgSQL, PL/Tcl, PL/Perl, PL/Python, PL/Java, PL/Lua, PL/R, PL/sh, PL/v8, …

see more:

2 Likes

Student - accepted :white_check_mark:

ORGANIZATION : PostgreSQL :elephant:
“Create procedural language extension for the Julia :julia: programming language
Google Summer of Code

9 Likes