Hi Ihor, I use only MySQL, PostgreSQL and Vertica. However for me sql-product postgres in my sql-connection-alist works both in ob-sql as well as SQLi. In the end you are still able to overwrite in your src block parameters via :engine
Andy > On Feb 5, 2023, at 11:58 AM, Ihor Radchenko <yanta...@posteo.net> wrote: > > Andreas Gerler <ba...@bundesbrandschatzamt.de> writes: > >> without the patch your org source block has to look like: >> >> #+begin_src sql :engine mysql :dbconnection mysqldb1 >> SELECT * FROM nodes; >> #+end_src >> >> with that patch you can just type >> >> #+begin_src sql :dbconnection mysqldb1 >> SELECT * FROM nodes; >> #+end_src >> >> because your engine is mapped to sql-product in your sql-connection-alist: >> >> (setq sql-connection-alist >> '((mysqldb1 (sql-product 'mysql) >> (sql-server "10.10.42.1") >> (sql-user "dbadmin") >> (sql-password "foo") >> (sql-database "testdb")))) > > Thanks for the explanation! > This logic assumes that engine names in ob-sql are the same with > products in `sql-product-alist'. Which is not true. For example, ob-sql > has postgresql while `sql-product-alist' has postgres. > > Further, some engines are in ob-sql but not in sql.el and vice versa. > > In order to provide auto-detection of sql engine we should first > synchronize the engine names. > > -- > Ihor Radchenko // yantar92, > Org mode contributor, > Learn more about Org mode at <https://orgmode.org/>. > Support Org development at <https://liberapay.com/org-mode>, > or support my work at <https://liberapay.com/yantar92> >