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

**URL:** <https://discourse.julialang.org/t/gsoc-2021-postgresql-create-procedural-language-extension-for-the-julia-programming-language/56918>\
**Category:** Community\
**Tags:** gsoc, postgresql, pljulia\
**Created:** [March 11, 2021, 12:00am UTC](https://discourse.julialang.org/t/gsoc-2021-postgresql-create-procedural-language-extension-for-the-julia-programming-language/56918 "2021-03-11T00:00:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ImreSamu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/imresamu/32/20677_2.png) [@ImreSamu](https://discourse.julialang.org/u/ImreSamu)\
**Post date:** [March 11, 2021, 12:00am UTC](https://discourse.julialang.org/t/gsoc-2021-postgresql-create-procedural-language-extension-for-the-julia-programming-language/56918/1 "2021-03-11T00:00:08Z")

</div>

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

**" Create procedural language extension for the Julia programming language"**

- [GSoC 2021 - PostgreSQL wiki](https://wiki.postgresql.org/wiki/GSoC_2021#Create_procedural_language_extension_for_the_Julia_programming_language_.282021.29)
- _“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.”_
  - [pljulia / pljulia · GitLab](https://gitlab.com/pljulia/pljulia)

---

<div class="post-metadata">

**Author:** ![logankilpatrick](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/logankilpatrick/32/38123_2.png) [@logankilpatrick](https://discourse.julialang.org/u/logankilpatrick)\
**Post date:** [March 11, 2021, 4:02am UTC](https://discourse.julialang.org/t/gsoc-2021-postgresql-create-procedural-language-extension-for-the-julia-programming-language/56918/2 "2021-03-11T04:02:59Z")

</div>

Awesome to see this and thanks for sharing!

---

<div class="post-metadata">

**Author:** ![Nosferican](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nosferican/32/9275_2.png) [@Nosferican](https://discourse.julialang.org/u/Nosferican)\
**Post date:** [March 11, 2021, 4:14am UTC](https://discourse.julialang.org/t/gsoc-2021-postgresql-create-procedural-language-extension-for-the-julia-programming-language/56918/3 "2021-03-11T04:14:24Z")

</div>

@iamed2

---

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [March 11, 2021, 8:05am UTC](https://discourse.julialang.org/t/gsoc-2021-postgresql-create-procedural-language-extension-for-the-julia-programming-language/56918/4 "2021-03-11T08:05:09Z")

</div>

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`](https://gitlab.com/pljulia/pljulia/-/blob/master/sql/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 🙂

---

<div class="post-metadata">

**Author:** ![ImreSamu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/imresamu/32/20677_2.png) [@ImreSamu](https://discourse.julialang.org/u/ImreSamu)\
**Post date:** [March 11, 2021, 10:11am UTC](https://discourse.julialang.org/t/gsoc-2021-postgresql-create-procedural-language-extension-for-the-julia-programming-language/56918/5 "2021-03-11T10:11:08Z")

</div>

> [@Sukera](#):
>
> This is about using julia _in PostgreSQL syntax_ to create functions in SQL to be executed/called by PostgreSQL,

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:

> **[H.3. Procedural Languages](https://www.postgresql.org/docs/13/external-pl.html)**
>
> H.3. Procedural Languages # PostgreSQL includes several procedural languages with the base distribution: PL/pgSQL, PL/Tcl, PL/Perl, and PL/Python. In addition, there …

---

<div class="post-metadata">

**Author:** ![ImreSamu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/imresamu/32/20677_2.png) [@ImreSamu](https://discourse.julialang.org/u/ImreSamu)\
**Post date:** [May 18, 2021, 4:55pm UTC](https://discourse.julialang.org/t/gsoc-2021-postgresql-create-procedural-language-extension-for-the-julia-programming-language/56918/6 "2021-05-18T16:55:38Z")

</div>

Student - accepted ✅

ORGANIZATION : PostgreSQL 🐘  
_“Create procedural language extension for the **Julia :julia: programming language** ”_  
[Google Summer of Code](https://summerofcode.withgoogle.com/projects/#6743913253044224)
