From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id SHX/Bp+L32OvKAAAbAwnHQ (envelope-from ) for ; Sun, 05 Feb 2023 11:57:35 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id aIEKB5+L32PWLQEA9RJhRA (envelope-from ) for ; Sun, 05 Feb 2023 11:57:35 +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 CAB9D1403D for ; Sun, 5 Feb 2023 11:57:34 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pOchH-0008BL-Hd; Sun, 05 Feb 2023 05:56:35 -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 1pOchF-0008Ae-7s for emacs-orgmode@gnu.org; Sun, 05 Feb 2023 05:56:33 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pOchC-0004rT-Rd for emacs-orgmode@gnu.org; Sun, 05 Feb 2023 05:56:33 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 2913A2401BF for ; Sun, 5 Feb 2023 11:56:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1675594587; bh=QezpHHcIYce+Kra2T7EDQ+I2LTOOVo8DZoluZiKARRo=; h=From:To:Cc:Subject:Date:From; b=k20ViRGCzBI80kiZa+71t3Sz7UdtKAfyF9DsX+gxuPpYDHEzddbEgjUFob6bi1E2K Kiu2rWTBu+lGbhTh+WjTNFsDz/cN0mazGFpCxmL5Z6DX4rzCAoplkoC50KRwYlbNvG jbUjbRNSfoYHpT1ft6NXtNGfsQJgFqbfaknAXrDkB/jt+LxSCGQLt4KdFMBnVRCN8Z yUE7bZntSD5/xvxBv2Te5Jorlc1OUqWnBpklOQ3sjj0DqAGS2uKSmDcBIv5iHWMUxJ jEFRLgoG33+q9a/ubtEYJ7ko5C2jKLlXzkq2RuueYmcvHqCPIKd6conbHYqsPZGt+3 vvCVt9OqK5K2g== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4P8mXp21nHz6tm4; Sun, 5 Feb 2023 11:56:26 +0100 (CET) From: Ihor Radchenko To: Andreas Gerler Cc: emacs-orgmode@gnu.org Subject: Re: ob-sql dbconnection engine In-Reply-To: References: <31A92865-F761-42B4-BDD6-C8189CDE2045@bundesbrandschatzamt.de> <871qng86fa.fsf@localhost> Date: Sun, 05 Feb 2023 10:57:05 +0000 Message-ID: <87ilgge5xa.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, 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=1675594654; 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=ScjzUH1DcJNd7WsuaBhqXXspPJJvzONFV5F4q/QKwjY=; b=PQ3S6NflM0Cg5sIdRUuIcp4oWa/4VpYgyM0yZvJOezntPeLObht2RM9lZWuFqAFwomlQKk 39VlAGd07reEsDMMn8VBqh6ekwaac5KIE726LrTDQkit/c5HgOuhtzwVw0oEcVOVqaoMgh +JgLALsTntup+nFo65joqPSjh8KHbHK/s9p1V2xNa7Tb+K4kUccSWrdCcAEOY1o2uAfuMU 69JL6N4V26ghTO+YDMtf/Iunybcv6gNqW5KVBTXErO/9ujqnLPbt4+SfEB2bsrc3DnMrXe iJpmeJBBv6S19vLy3zELRToGjPCXYLSuFecUeGu1i619snYJmA/F3jrz55vyIQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=k20ViRGC; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1675594654; a=rsa-sha256; cv=none; b=cQLGOMiG+paDd/LnqjQWLVoHScfR3dNBuuuJdPGCD4TlTzBm0X81B7+WvImrQcRqHtOuv2 nnB4iimZRMYme+xUjeDwG8B8quPy7rNEU8vlKz35qWIzhfgO4DNTbjuv0lJ1MJ/hVg9grm iBbKkDiRBHSOs5rEEdXg4+fwTw4r3vCUUIZVhFXtpCpKTatoHDKY+cQHXMvK3wFzz3J3Xe O42O4Bt7Lqh4epVUKHxgUWeRbxerIYHpZKD/yftKo/aGUrKMtTfuhw/cynTa7uEalaxWRO zGPMkc9dDoOxZyxt/RWvEl76DqrEeOJPWvqqjCZmcsNRtd3REjaqJT9CfxTKBA== X-Migadu-Spam-Score: -6.05 X-Spam-Score: -6.05 X-Migadu-Queue-Id: CAB9D1403D Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=k20ViRGC; 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"; dmarc=pass (policy=none) header.from=posteo.net X-Migadu-Scanner: scn1.migadu.com X-TUID: /D547w9IAfFj Andreas Gerler 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 . Support Org development at , or support my work at