bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#65274: 29.0.91; [feature request] Readonly argument for emacs built-


From: Eli Zaretskii
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

> 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]