Ihor Radchenko <yanta...@posteo.net> writes: > Tim Cross <theophil...@gmail.com> writes: > >> to be very clear, ob-sql is not adding any NEW interface to any external >> program. It is just using the Emacs built-in SQL library (Elisp), which >> has been part of Emacs for a long time (I was using it in late 90s to >> work with Oracle RDMS). It is this library that provides the 'support' >> for things like Oracle's RDMS. If you want more specific information, >> ask on emacs-devel. Org mode is just using this built-in library. > > This is wrong. > `org-babel-execute:sql' directly calls the CLI executable via `process-file'. > > That said, the discussion about sql.el is also relevant wrt non-free SQL > client support. It will be helpful to clarify what is morally acceptable > for all the scenarios, not just for Org's use-case. > >> The Oracle database is simply a relational database management system in >> the same way as Postgres, MySQL, Ingris, MS-Sql server etc. All of these >> have a CLI client and support connections via JDBC. The sql.el library >> provides specialised comint based interfaces which run the CLI to >> communicate with the RDMS. The closest of your 3 choices is b, as the >> build-in Emacs sql library executes the RDMS CLI in a sub-process comint >> buffer. > > Org does not use this comint interface yet. We may in future though, for > sessions: > > (defun org-babel-prep-session:sql (_session _params) > "Raise an error because Sql sessions aren't implemented." > (error "SQL sessions not yet implemented"))
OK, thanks the for correction. I was confused because the set of supported RDBMS is the same as those supported by sql.el and the connection credentials uses the same variable name i.e. sql-connection-alist. However, I gues the point remains, sql.el and ob-sql.el support a number of non-free RDMS and I think this is fine given that 1. There is no encouragement, implicit or explicit, to use a non-free database 2. Provided support provides a way to interact with these non-free RDMS using free software. 3. There is no requirement to install non-free software to use ob-sql.el. The software is fully functional using a free RDMS like postgres. For maintenance reasons and to add session support, I would suggest that using sql.el instead of re-inventing this wheel would be a better outcome. I've used sql.el for years and it works extremely well and I don't htink it would be too hard to integrate into ob-sql.