From: Eli Zaretskii <eliz@gnu.org>
To: Nicolas Graves <ngraves@ngraves.fr>
Cc: 65274@debbugs.gnu.org
Subject: bug#65274: 29.0.91; [feature request] Readonly argument for emacs built-in sqlite support.
Date: Mon, 14 Aug 2023 19:40:37 +0300 [thread overview]
Message-ID: <83350lbmre.fsf@gnu.org> (raw)
In-Reply-To: <875y5iznne.fsf@ngraves.fr> (bug-gnu-emacs@gnu.org)
> Date: Sun, 13 Aug 2023 22:35:17 +0200
> From: Nicolas Graves via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>
>
> The sqlite3 cli tool has an option -readonly, which doesn't seem to be
> available in Emacs for now. This means that if someone wants to inspect
> a locked database, we would necessarily need to make a copy, while the
> -readonly flag would be enough using a shell-command.
Could you please explain what is a "locked database"?
The sqlite3 documentation says:
SQLITE_OPEN_READWRITE
The database is opened for reading and writing if possible, or
reading only if the file is write protected by the operating
system. In either case the database must already exist, otherwise
an error is returned. For historical reasons, if opening in
read-write mode fails due to OS-level permissions, an attempt is
made to open it in read-only mode. sqlite3_db_readonly() can be
used to determine whether the database is actually read-write.
My interpretation of this is that if opening for reading and writing
fails, SQlite will automatically attempt to open in read-only mode.
Does this not work in some cases? IOW, in which cases would this
readonly option you are asking to add be useful?
Thanks.
next prev parent reply other threads:[~2023-08-14 16:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <878rbc1eem.fsf@ngraves.fr>
2023-08-13 20:35 ` bug#65274: 29.0.91; [feature request] Readonly argument for emacs built-in sqlite support Nicolas Graves via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-14 16:40 ` Eli Zaretskii [this message]
2023-08-16 10:17 ` Nicolas Graves via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-19 9:21 ` Eli Zaretskii
2023-09-02 7:17 ` Eli Zaretskii
2023-09-15 6:54 ` Eli Zaretskii
[not found] ` <87il8b4k6s.fsf@ngraves.fr>
2023-11-21 13:41 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83350lbmre.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=65274@debbugs.gnu.org \
--cc=ngraves@ngraves.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.