I tried swipl prolog and enjoyed it but poor PostgreSQL support scared me away. Any prolog developers have any advice? I really like prolog but need an implementation with good db support for specifically Postgres but haven’t found anything.
For instance, see:
Can I replace a LAMP stack with SWI-Prolog?
<table_name>(<column 1, row 1>, <column 2, row 1>, ...., <column n, row 1> )
...
<table_name>(<column 1, row m>, <column 2, row m>, ...., <column n, row m> )
So each table becomes a predicate with the table name as its predicate symbol ("functor" in Prolog), the number of the columns in the table as its arity (the number of arguments of the predicate) and where each row of the table is a separate clause of the predicate.Many tables exported this way will not be necessary any more, particularly those ubiquitous tables used to map other tables' keys between them ("Customer_ID_Ticket_Id" etc) and in most cases primary key fields will no longer be necessary and so on- but you can move all your data to Prolog, with very little change, is what I'm trying to say.
Mer' Christmas :)
And, since those are not usual goals of an interpreter, I would guess "not very competent" for at least the first two with high certainty.
It also raises the question of whether Postgres has a good Prolog plugin. This one looks more likely to be useful.