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 mCSoMYcrxWOFRQAAbAwnHQ (envelope-from ) for ; Mon, 16 Jan 2023 11:48:39 +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 CFWPMYcrxWO/2wAAauVa8A (envelope-from ) for ; Mon, 16 Jan 2023 11:48:39 +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 767C923730 for ; Mon, 16 Jan 2023 11:48:39 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHN28-0002GJ-JX; Mon, 16 Jan 2023 05:48:09 -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 1pHN22-0002G7-Ad for emacs-orgmode@gnu.org; Mon, 16 Jan 2023 05:48:02 -0500 Received: from mout-p-101.mailbox.org ([2001:67c:2050:0:465::101]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1pHN1y-0001JF-LF for emacs-orgmode@gnu.org; Mon, 16 Jan 2023 05:48:01 -0500 Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4NwTJ80kd4z9sWK; Mon, 16 Jan 2023 11:47:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kraus.my; s=MBO0001; t=1673866072; h=from:from: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; bh=7VozSladpzpYEuU6VrelMqCpVo9wdZEGmbVPcDU3iik=; b=r3f+BVTKfIULc6KqALEgRO0lrfFNeBl0TrVOksEr59ASCro9rJeiUaJTS6egyo/hRDuWz3 ViF2wY5nwV+3kiUxVIfv7RC+53wxNkD91FAddm8FYlETgDusLjxCqQI0v2w1ULwLh/k3HA FnIuzCmGLAn7EiU/ftZyzLNcwBMkZXQOMZUK2nZf8GQROetfplcxICVzFwgfoUJvqY2wmd w+cwGuddycn/SfMWGn2UhJwdhFINM0aBRBePDVQe8wwvigIAv/mX8dX19sHdIW81qQHIo1 o3UfbXFMepkwtKx2wWxylJqVNtsVeMTT+q5uDjYk79NBLi4vZnGIjI10rM8sIQ== References: <87r0vuzs3w.fsf@localhost> From: Daniel Kraus To: Ihor Radchenko Cc: Andreas Gerler , emacs-orgmode@gnu.org Subject: Re: [BUG] ob-sql sql-connection-alist Date: Mon, 16 Jan 2023 11:45:58 +0100 In-reply-to: <87r0vuzs3w.fsf@localhost> Message-ID: <878ri2bvsh.fsf@kraus.my> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4NwTJ80kd4z9sWK Received-SPF: none client-ip=2001:67c:2050:0:465::101; envelope-from=daniel@kraus.my; helo=mout-p-101.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_NONE=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-Seal: i=1; s=key1; d=yhetil.org; t=1673866119; a=rsa-sha256; cv=none; b=KC5RPhslUQdda+6dwbk5S5rWl3DtclfJsrpJscIMtKZ3vxNrubLqxgN8RbV7pRLdM18YI8 T8hDvxMlaKTkUjW9g7kgdqvyocG1fHFhJwYc+w2fkW39HEcGkaOYXYmL6oOg3ICdvUuV84 NdtjozLTrprqWLzfudwMemUWpsX/Tv47oixfKFDomzvlQcAiCESnZ5kgnSd3FExtJ7Em1s rOg7wEtFbSptjtHAGATHaV6jqQLQsjBIBYGMA3iItb9PgghlezkF0aZQczH+2B8CuYUVwN g9tPRjYq/Do6AOmLcZkzhdhIuM9XSw0pGYJXyMb1IbMoTfKxOdF0KEXhSV00UA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=kraus.my header.s=MBO0001 header.b=r3f+BVTK; 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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673866119; 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:dkim-signature; bh=7VozSladpzpYEuU6VrelMqCpVo9wdZEGmbVPcDU3iik=; b=abs6j7JfkJOj+F6h/sxit4v4sZW7w/V0pzN+AI6To4EkcgMDmH7Y3LzvWgbm2hCbWOZukb 6e81yyKBnSxchxHH5xtlzwfnREaxIAkfhEe8sSM39HK3eYgTBe4YVmAZx8yWbkJt8ddjJ7 I+Iw6aZ85u4hmzJALhygDgLz/1WSb4AXZ21MB+LpMA1lwsn+4pgcv7Zgj38HfS0CNyIw6v ujsofrQzAuqqRkQVsRIN9YzAs0WMkxt1rTWE8oiTk1UlecGou3iSCSFVg8IiKpDFKdqU8n OSB21zR02ZOH2VE6r2bpVMQAFgAlX2SlLTMlMITHA6IY3Ov6VmOhzgNQzPM8+A== X-Migadu-Spam-Score: -3.82 X-Spam-Score: -3.82 X-Migadu-Queue-Id: 767C923730 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=kraus.my header.s=MBO0001 header.b=r3f+BVTK; 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-TUID: q2YLpUm9NX7s Ihor Radchenko writes: > Andreas Gerler writes: >> (setq sql-connection-alist >> '((testdb (sql-product 'mysql) >> (sql-server "127.0.0.1") >> (sql-user "mysql=E2=80=9D) >> (sql-port 3306) >> (sql-password =E2=80=9Cfoo") >> (sql-database "mysql")))) > > I am looking at the docstring of `sql-connection-alist': > > An alist of connection parameters for interacting with a SQL product. > Each element of the alist is as follows: > > (CONNECTION \(SQL-VARIABLE VALUE) ...) > > Where CONNECTION is a case-insensitive string identifying the > connection, ... > > So, your "setq" example is incorrect: must use "testdb" instead of > `testdb' symbol. I'm not sure why but I also have the connection as a symbol in my `sql-connection-alist`. Looking in `sql.el` `(sql-connect)`, they also use `assoc-string` to receive the connection: https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/progmodes/sql.el?h=3D= ac2a6fc83fac6390892b068a830ebe0f22364e05#n4398 So I think that change is good and supports both formats (same as `sql-connect`). Cheers, Daniel