From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id ChZrO5TxzmOtxwAAbAwnHQ (envelope-from ) for ; Mon, 23 Jan 2023 21:44:05 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id YNgeOpTxzmOD2AAAauVa8A (envelope-from ) for ; Mon, 23 Jan 2023 21:44:04 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7839A1EF11 for ; Mon, 23 Jan 2023 21:44:04 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pK3ez-0006A6-6N; Mon, 23 Jan 2023 15:43:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pK3ey-00068Y-1Z for emacs-orgmode@gnu.org; Mon, 23 Jan 2023 15:43:20 -0500 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pK3ew-0003ER-0R; Mon, 23 Jan 2023 15:43:19 -0500 Received: by mail-pj1-x1036.google.com with SMTP id z4-20020a17090a170400b00226d331390cso12097551pjd.5; Mon, 23 Jan 2023 12:43:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:in-reply-to:date:subject:cc:to:from:user-agent :references:message-id:from:to:cc:subject:date:message-id:reply-to; bh=fc+3ZbnK5Fa4c1+GrjJq4IFJuMwhQLeBXTrlicfHpW8=; b=jzKF/wsZ55BgPjaw8Fxwa+dOQXSr29+84c8asX3jl219D1G4rd9xFX2tZvidYgORUS VNROZagOi6Y6hjdf4DpQoZOjw2JcpMI4mqXx7BGz0c62XBUpCIjhtstMRrxbYQXmbe+u ZLqfif6dClUDGLyCU68F5kXdBZnrf1gRA48ZQRNJh1qI30Y2gyWMcEH7ngzTwQEVcnMn RBPntq6bNSMXhRjhFlvCEKg5SKR7M7UJBED89vlgfTrkZ+ocxW5M2NVOstCPJnfS8PQd qlm1WuPnC5KnSbdEhbmlpaeAgdcdqAY7dPEQjacxptrx2OzNjLQ35EgA6BQWk2Eh2cbk vPsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:in-reply-to:date:subject:cc:to:from:user-agent :references:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=fc+3ZbnK5Fa4c1+GrjJq4IFJuMwhQLeBXTrlicfHpW8=; b=NCjOWpnl/OcorPLaxokUTGqai5TjCKrhAuvdAkBk8UEMZPZJxLlk12FArpdfkPJ70z 5plkyDqe+i3XDbdkyTQQ4SxCnx2ddYS9YZJX4R160BEHuxmmkn9ZIjEXeSq1HBFcdbSJ 8cz+FsTg8Ydr8dNGeLcjzzXNyXDK3x6Ev4NVLz4gQMAtmV8oTwaZ5XcScHV3dlAW7XbF eb9Ma28hivEXt1FsVNpG7QTQBnihwaaFTdOKyd6BU4RyvbSjA8ZdeaRHFTQAtomK7HgP ZqT3nKDqaiYRqJZKB+kJkCOA5+JrkR3Zq8NSN4d1ifE0Z1RfKVcO0zFb6a7eP+M38nrz +zEQ== X-Gm-Message-State: AFqh2kqu1d2/cHvAJWg2IXukwECwk6UF++2+GP1TnpMIk/QdN+NNYk16 f4Yo/bxxuaPaq/BU6nN+Pr9bARxijOej8A== X-Google-Smtp-Source: AMrXdXtEPa3+UbXG5anA+VpxOHHnr0r4vRW9LtsZ+3oLCG5hc3ZXfu43GZrSUZvakEBNIFbFzzFhTA== X-Received: by 2002:a17:903:22c9:b0:194:d4d1:a917 with SMTP id y9-20020a17090322c900b00194d4d1a917mr22178976plg.60.1674506595019; Mon, 23 Jan 2023 12:43:15 -0800 (PST) Received: from dingbat (220-235-140-148.dyn.iinet.net.au. [220.235.140.148]) by smtp.gmail.com with ESMTPSA id 6-20020a170902c20600b00186acb14c4asm132735pll.67.2023.01.23.12.43.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jan 2023 12:43:14 -0800 (PST) Message-ID: <63cef162.170a0220.faa08.09ef@mx.google.com> X-Google-Original-Message-ID: --text follows this line-- References: <874jsqbvfq.fsf@kraus.my> <87358an35i.fsf@localhost> <63c5b8db.170a0220.e466f.2573@mx.google.com> <87o7qxmr6y.fsf@kraus.my> <87fsc9iifs.fsf@localhost> <87y1pte7x1.fsf@localhost> User-agent: mu4e 1.9.16; emacs 29.0.60 From: Tim Cross To: Ihor Radchenko Cc: rms@gnu.org, emacs-orgmode@gnu.org Subject: Re: Supporting non-free SQL clients in ob-sql (was: [PATCH] ob-sql: Add support for Athena) Date: Tue, 24 Jan 2023 07:12:18 +1100 In-reply-to: <87y1pte7x1.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::1036; envelope-from=theophilusx@gmail.com; helo=mail-pj1-x1036.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1674506644; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=fc+3ZbnK5Fa4c1+GrjJq4IFJuMwhQLeBXTrlicfHpW8=; b=RYkTVo2On5M2XZNGJLvwvxV5aYSuvBA26wHFeUF969TcBqx5BVoD3DObibWJFUyp2NdRUc wDJeC8vGdXFWjZGtbmY3e2ePQvmUHCrkzjL7xAsHcSI/g39NdybynfpOG/WAxW0seVFZki U8B3tkiKhmn/HZ1e6L3ZsRbEyT39v5zrOmLSV3A672rVKmv3ahSF2MHkhAxLDLW5UWzRJT dyFzzeyM8MneYuvlmCFO2ThIcwlaetlBXpSpyFeyFSAWLTRsdKNXS3QEDbKzwnGIs/BAH2 hPfjKPleUcEUmbTfErC5XDMcS89VXzaGdC9KhMmRsKDLg5P/p/WLC4ZotnTvFg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="jzKF/wsZ"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1674506644; a=rsa-sha256; cv=none; b=q6QMFw+YgUzrFwPewGT+0fUSEkcHaLv5G725EvamdVsyOppGdJl9Y7eKOcrKSuXkH8EJiQ 6OmZsF+Ke+xZ3qxY3YP0Sa9SwMLi6tH+4+1Ep2HxDgaaKQoqmEdlgSV7ktMAjUvzXtscGy /bbWwJrsOQG5d5uleotYS+dEyzX6opFWBVb1n6CH/teqo2ljpEI+10pkU7YkCr3ns32Pom U79vVEMuIQ4UKnAzSp2BbczlRnoPE/R0BRx0M7WTvKnwDO64I74sRc7t8d6mn+jGs6ZIDK kOARX/4V72UbjZ0YwV12jUG/9+jsujyzBxhFDJk4FBgR3r73HMvffq6CnuAJ3Q== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="jzKF/wsZ"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.76 X-Spam-Score: -4.76 X-Migadu-Queue-Id: 7839A1EF11 X-Migadu-Scanner: scn1.migadu.com X-TUID: FpC1PFnqy8YW I just wanted to provide some additional information which RMS may find informative. Under the hood, ob-sql.el is using the built-in Emacs sql.el library. It is this library which provides the 'support' for various SQL database engines. That support has been part of the sql library since it was added to Emacs in about 1998. The 'support' is essentially specialised comint based interfaces tweaked to work with the various SQL database engine command line clients such as psql for Postgres and sqlplus for Oracle. This involves codes to use the comint buffer to send commands/regions to the SQL client and read back the results and run interactive 'repl' like sessions with the client. No additional software is installed by either ob-sql.el or sql.el - it is all just elisp. Any additional software, such as the database client, must be installed separately by the user (clients on remote machines can also be used via ssh). There are no jar files or any other additional bits of software installed. There is also some additional support in the form of font-locking which includes support for different SQL variants i.e. in addition to ANSI SQL, you can also specify Postgres SQL, Oracle SQL, MS-SQL etc to get font-locking which supports some of the keyword differences between the different SQL engines. Personally, I don't believe any of this contravenes FSF guidelines. Neither sql.el or ob-sql.el are encouraging use of any specific database engine. What these libraries do is in fact allow those who do want to use free software and avenue for interacting with these systems using free software rather than on-free (similar to Emacs' WIndows and Mac support). The software as a service issue is far more difficult to assess when it comes to databases as the most common architecture with databases is to have the database on a separate server which is often not local and where frequently, the user has little or no control over the software. This has become even more common in recent years due to the growth in big data and the problem that most individuals and small groups cannot afford the costs or handle the administrative complexity associated with hosting databases with large data sets and storage requirements. Ihor Radchenko writes: > Richard Stallman writes: > >> > > Because we already support Orcale, SAP Hana, MSSql and Vertico for example. >> >> Would someone please tell me more concretely what kind of "support" >> this is? Which GNU package supports them, and how? > > [Jean Luis mentioned M-x sql-* commands in another message. They may > also be worth discussing, but are not what I meant in the original > message] > > ob-sql is Org mode's feature (part of Emacs) allowing users to execute > SQL code inline inside Org files: > > #+header: :engine sqlite > #+header: :database ~/.local/share/qutebrowser/history.sqlite > > #+begin_src sql > SELECT URL FROM History ORDER BY "URL" DESC LIMIT 5 > #+end_src > > #+RESULTS: > | qute://help/commands.html | > | qute://help/commands.html | > | qute://help/ | > | qute://help | > | qute:// | > > Note the :engine argument. It determines which CLI backend is being > called by Org mode to query the database. > > ;; Engines supported: > ;; - mysql > ;; - dbi > ;; - mssql > ;; - sqsh > ;; - postgresql (postgres) > ;; - oracle > ;; - vertica > ;; - saphana > > Some of these engines are free software and we have no issue supporting > them. Some are not. > >> ... Also, what kind >> of things are those? Are they nonfree programs, or are they SaaSS? >> Some of them I recognize as nonfree programs, but some names I don't >> recognize at all. > > At least, mssql is non-free with no source code available. Same for > oracle, vertica, and saphana. > > I am not sure about SaaSS - even postgresql (free software) may be used > as a service provider by running it on server the user does not control. > Probably, I do not fully understand how SaaSS is defined (I did read > https://www.gnu.org/philosophy/who-does-that-server-really-serve.html) > > Earlier in the thread, https://github.com/dbcli/athenacli was proposed > as another CLI to support. Athenacli itself is distributed under BSD-3 - > free license. However, the CLI is just an interface to Amazon Athena - > server-side database service. > > From my limited understanding, the main purpose of Amazon Athena is > querying "big data" databases for further analysis, which does not > constitute SaaSS (AFAIU) - users may not own the "big data" and may not > have enough resources on their own computers to run the SQL queries that > utilize machine learning models. > >> There are situations where it is acceptable for a GNU package to >> support its use together with certain nonfree programs. Mainly when >> the nonfree program so well known that this support mainly encourage >> people who already use that nonfree program to start using the GNU >> package with it, and is unlikely to do the converse. >> >> See the GNU Maintainers Guide for more details. > > It is hard to define "well known". For me, oracle and mssql databases > are well-known (just by company name), while saphana and vertica are > not. But I do not work with SQL and thus lack expertise about what is > being used in reality. How to judge? > >> However, use with a SaaSS system (service as a software substitute) is >> a different issue (though it has much in common). I'd like to think >> about it and ask advisors for advice. These details can help me start >> to think about it. > > I feel very confused about possible guidelines for SaaSS. > > SaaSS does not always require specific CLI tools to be used. > Consider common HTTP requests or GraphQL that might be employed to > communicate with SaaSS. Should we stop supporting HTTP requests just > because they can be used to communicate with SaaSS? Probably no. > What about something more specific like the ability to query remote > database provided by SaaSS service? One may just need login/password + > free sql implementation. What if it is not SELECT query, but INSERT > query sharing the data with SaaSS? What about the history of SELECT > queries being associated with the user and the sold to third-party? What > if external free CLI tool is needed? non-free CLI? There should probably > be a boundary somewhere, but it is not clear where it should lie.