Replies: 4 comments 6 replies
-
It's quite possible. I've done this for SWI Prolog here omnigres/omnigres#215 (just need to take this over the finish line). It can be a considerable amount of work, but could be worthwhile to those who appreciate having Prolog. I'd love to evolve the work I referenced above to support more than just SWI Prolog (or at least ensure that different implementations implement the same interfaces and predicates to accessing the database to make them portable). |
Beta Was this translation helpful? Give feedback.
-
I could do a proof of concept for this with pgrx, a basic consult+query looks like it would be relatively easy to do. |
Beta Was this translation helpful? Give feedback.
-
I'm working on a proof of concept, and it seems there is something weird happening to the .so file (on M1 mac). If I have a postgres language handler that doesn't refer to scryer, it loads and executes in postgres, but as soon as I add this line
to my handler function to use scryer, it compiles but fails to load in PostgreSQL:
I'm a rust newbie, so any ideas about what could be the problem, are welcome. |
Beta Was this translation helpful? Give feedback.
-
https://github.com/tatut/pgprolog Very preliminary proof of concept here. It only takes one TEXT parameter and returns TEXT, but it does consult the source and take the parameter from the function execution... |
Beta Was this translation helpful? Give feedback.
-
PostgreSQL supports many "procedural" languages you can make stored procedures with (including Rust).
I think a Prolog language would be a nice language to create database logic with, and thought of Scryer as a good candidate due to its implementation language.
I don't have knowledge about creating PostgreSQL extensions in Rust, but there seem to be many.
So I'm asking if anyone has guesses about how much work that would be?
Beta Was this translation helpful? Give feedback.
All reactions