* [2025-01-17 Fri 06:58 +0100] Ihor Radchenko > Phil Estival writes: > >>> Is there any specific reason why you are seemingly re-implementing what >>> `sql-product-interactive' does? May we re-use it instead? >> >> Yes. When opening a new connection `sql-product-interactive' will >> systematically ask for input in the mini-buffer prompt and fill the >> required information, suggesting inputs from the ones previously given. > > What about changing sql.el to provide the necessary flexibility? > I'd prefer it better than rewriting parts of sql.el in Org mode. Gladly. Here is a proposal for patch for `sql-product-interactive' in sql.el. A specific case for sqlite is handled and this is not 100% satisfying. I have the feeling this should rather be where a conversion of nil params to empty string happens, but sql.el is rather long and the verifications required are numerous... There may also be other db that allow connection without one these parameters... The previous configuration from this series of patch, with a variant of `sql-product-interactive', would allow a nil database for a session of sqlite, now it needs to mention an empty string for :database or to set it as a default value in `sql-sqlite-login-params'. Next is the patch for ob-sql that rely on the modification of `sql-product-interactive' to keep session connection smooth. This substract an addition from the previous series of patch but I guess the proper way to do will be to submit the diff from main after these reconsiderations. A side note: there are contradictory comments in sql.el. - `sql-product-interactive' Do not call this function by yourself. The environment must be initialized by an entry function specific for the SQL interpreter. See `sql-help' for a list of available entry functions. - `sql-help' You can also use M-x sql-product-interactive to invoke the interpreter for the current ‘sql-product’. -- Phil Estival