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 ms9.migadu.com with LMTPS id cFgsJNaMUmR8RwEASxT56A (envelope-from ) for ; Wed, 03 May 2023 18:33:26 +0200 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 SAYlI9aMUmS3hAAAG6o9tA (envelope-from ) for ; Wed, 03 May 2023 18:33:26 +0200 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 2335E332 for ; Wed, 3 May 2023 18:33:26 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1puFP3-0007f4-MB; Wed, 03 May 2023 12:32:29 -0400 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 1puFOy-0007Z1-MM for emacs-orgmode@gnu.org; Wed, 03 May 2023 12:32:25 -0400 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1puFOx-0002pt-58 for emacs-orgmode@gnu.org; Wed, 03 May 2023 12:32:24 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1puFOu-00067w-En for emacs-orgmode@gnu.org; Wed, 03 May 2023 18:32:20 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: Re: [PATCH] ob-sqlite: Use a transient in-memory database by default Date: Wed, 3 May 2023 23:32:14 +0700 Message-ID: References: <20230503125903.95063-1-salutis@me.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-4.28, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-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-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1683131606; a=rsa-sha256; cv=none; b=d+ALt3UnavA1eLt6zu/iq0fkCyva1y7rWCwa1o4c/2mikO5wqjn/yC6dE6zbOgqQodUtU/ mqO2nM0kgw2XJ2mMILDCrSetK+2O/81A/luTwhI5c1OVzvYRj8rGjkI7lwofVcMXDFJ90W Eeb/7P1squOC7qUICDCSKhB73etdmr8pAFS6GKON1iBSMpp6eIkfa67sfHWrawBXkHwXC7 MhAW70iBx4XBL886kgfUHPtlS9eprYkvOObC/aFlCn6P4K3h6adZOQB5Os2vSm/u7hjP7G 39Nb++JbrVmxVLn+Eyc8dQC4tmsYJaz+0iKIqmn/Jj2y5geNq7rxi8FoXM71dA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1683131606; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=4JjILdUQzGp0zLP21sSUQcBt9jgDDmJcbEUZ0p32gNk=; b=cKd6aY9Q+iIbrOMZHN5gtxqwp7bUR7z7FOjS8vsjDCKoUYLD9ch6BOn4DbykfLEHoQJKGx f++44e0xXDD2FSCwoZnce8WL2osbZOqlgD4uSETeh0T1+CEnd5mhVK51DRkCOYwik4dcEG G4y8gGh+XrPmq7YeFDwaOznkxnyX93XKLpth7pm6e0ABkuHADZVPXjABd2eeTe1QLHhybD 0LKmdzdQmr3znINMvQUKxjPaG95PFLdTVyqCOkc2VOIfN1kMf1Fm/Pyhg4gCrCsq0U4Uec HEE2MbRqWrJjfzDIOEQfmcHh3ZEEv1COvB/0SjoCzVL0PEhrCctMzFeQXHuOEw== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=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" X-Migadu-Spam-Score: 2.50 X-Spam-Score: 2.50 X-Migadu-Queue-Id: 2335E332 X-TUID: HCN52kLX+P8S On 03/05/2023 22:12, Max Nikulin wrote: > On 03/05/2023 19:59, Rudolf Adamkovič wrote: >> +++ b/lisp/ob-sqlite.el ... >> -    (db (cdr (assq :db params))) >> +    (db (or (cdr (assq :db params)) ":memory:")) > > I am unsure what is better, to add a fallback here or to add :db > ":memory" to the org-babel-default-header-args:sqlite variable. Perhaps it is better to keep current behavior with error by default and just to recommend more prominently using file local header arguments #+PROPERTY: header-args:sqlite :db ":memory" Changing defaults is a compromise. Perhaps you mostly use src blocks as playground and in-memory database is really convenient for you. However missed :db file in a block creating tables may cause a *delayed* error that will happen on attempt to insert some data to these tables later. It is harder to figure out that :db parameter was forgotten several screens above. The cost of debugging might be higher than adding a property line to files where a user is experimenting with sqlite features.