From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id wKYCD9y/42PyTwAAbAwnHQ (envelope-from ) for ; Wed, 08 Feb 2023 16:29:32 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id UL8ADty/42MXzwAAG6o9tA (envelope-from ) for ; Wed, 08 Feb 2023 16:29:32 +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 BE8BD2C474 for ; Wed, 8 Feb 2023 16:29:31 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pPmNL-0000JK-ET; Wed, 08 Feb 2023 10:28:47 -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 1pPmNJ-0000Hr-Lo for emacs-orgmode@gnu.org; Wed, 08 Feb 2023 10:28:45 -0500 Received: from mail.bundesbrandschatzamt.de ([198.7.63.95]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pPmN7-0004Gi-Oz for emacs-orgmode@gnu.org; Wed, 08 Feb 2023 10:28:35 -0500 Received-SPF: pass (mail.bundesbrandschatzamt.de: authenticated connection) receiver=mail.bundesbrandschatzamt.de; client-ip=91.64.203.22; helo=smtpclient.apple; envelope-from=baron@bundesbrandschatzamt.de; x-software=spfmilter 2.001 http://www.acme.com/software/spfmilter/ with libspf2-1.2.10; Received: from smtpclient.apple (ip5b40cb16.dynamic.kabel-deutschland.de [91.64.203.22]) (authenticated bits=0) by mail.bundesbrandschatzamt.de (8.14.7/8.14.7) with ESMTP id 318FSMea027730 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 8 Feb 2023 15:28:24 GMT Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Andreas Gerler Mime-Version: 1.0 (1.0) Subject: Re: ob-sql dbconnection engine Date: Wed, 8 Feb 2023 16:28:12 +0100 Message-Id: <7DD4D242-DCA0-4DF9-8EA9-03CE2823ECBD@bundesbrandschatzamt.de> References: <87ilgge5xa.fsf@localhost> Cc: emacs-orgmode@gnu.org In-Reply-To: <87ilgge5xa.fsf@localhost> To: Ihor Radchenko X-Mailer: iPhone Mail (20D47) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (mail.bundesbrandschatzamt.de [198.7.63.95]); Wed, 08 Feb 2023 15:28:24 +0000 (UTC) X-DCC-MGTINTERNET-Metrics: heimdall.bundesbrandschatzamt.de 1170; Body=2 Fuz1=2 Fuz2=2 X-SMTP-Vilter-Version: 1.3.6 X-Spamd-Symbols: SPF_PASS,UNPARSEABLE_RELAY Received-SPF: permerror client-ip=198.7.63.95; envelope-from=baron@bundesbrandschatzamt.de; helo=mail.bundesbrandschatzamt.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, T_SPF_PERMERROR=0.01 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-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1675870172; a=rsa-sha256; cv=none; b=NXGMvjo5eUmJjTMCQKsjvSWloxjxEjymn21lsrks8bcu88gc1tlRgn5rVx9svRtXHEytlm f8zCXr18r36f7lSDcSi8Ln0aSQjn6k+QCoGbuazmN5LrQR0PBwqCRN/8pBKIKKxqtv/A6W IMv4YPiENo5kzvs0Yl3McPQanqwlpw5n3YacRV9I6538sttfzS5zoCuxpyHyv3Ah+F50IV y4YQDahKxW4h2gCuJ3mZOZVfmk8YMrrRZ9hnoVn2APrreOfClR5iZ8z8t8xVAKJIVcu04D 3Y8lgPgB6ARV5bmtfkZHuxoA2YZIB48nBPCUrFqV7SJOaUstE3i37C7a5Mg3kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1675870172; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=OaVbTbwLRmJ6fqc72ydq8CnjXi8UmkTwmpk1KdKiXwk=; b=YXisde/Bci4I2GTCosf6SLr07HfpWetS7Ye1Y4RvcPvynYJSsduO6uqaZuNR1mYJyIO5bs 30qsEGn+MfFfV7Kry0Z8k7wx+8JUyj2R1+eYmoRZjrX9cItmq9EZwiLcekjmwM52/ShKxq zME2fbQRQJr+yMaGIzIE2imRw4W9hd2N0RHcjH9LXOUARU7sHYrYRjn6Sue3zHmXlS2hDD n3cmjz1il3rK4BvdhebfJtYtYOEBZMzrZK52lTxM+3PcwXpMN8+1w1mime8ZI1QNMNAX39 unoK+u/f0X3idTwEsDzro9iFBBVmWH3xZg3aQm0bNbIZeIx5aAnv62REcqKndQ== X-Migadu-Queue-Id: BE8BD2C474 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=none; 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=none X-Migadu-Spam-Score: -2.90 X-Spam-Score: -2.90 X-TUID: zJ6zryWeezzs 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 wrote: >=20 > =EF=BB=BFAndreas Gerler writes: >=20 >> without the patch your org source block has to look like: >>=20 >> #+begin_src sql :engine mysql :dbconnection mysqldb1 >> SELECT * FROM nodes; >> #+end_src >>=20 >> with that patch you can just type >>=20 >> #+begin_src sql :dbconnection mysqldb1 >> SELECT * FROM nodes; >> #+end_src >>=20 >> because your engine is mapped to sql-product in your sql-connection-alist= : >>=20 >> (setq sql-connection-alist >> '((mysqldb1 (sql-product 'mysql) >> (sql-server "10.10.42.1") >> (sql-user "dbadmin") >> (sql-password "foo") >> (sql-database "testdb")))) >=20 > 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. >=20 > Further, some engines are in ob-sql but not in sql.el and vice versa. >=20 > In order to provide auto-detection of sql engine we should first > synchronize the engine names. >=20 > --=20 > Ihor Radchenko // yantar92, > Org mode contributor, > Learn more about Org mode at . > Support Org development at , > or support my work at >=20