GNU bug report logs - #54591
29.0.50; sqlite-select returns blob result as multibyte string

Previous Next

Package: emacs;

Reported by: Yuan Fu <casouri <at> gmail.com>

Date: Sun, 27 Mar 2022 05:50:02 UTC

Severity: normal

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Rudolf Schlatte <rudi <at> constantly.at>
To: 54591 <at> debbugs.gnu.org
Subject: bug#54591: 29.0.50; sqlite-select returns blob result as multibyte string
Date: Sun, 03 Apr 2022 12:42:15 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>
>> No, I posted a later post which has the solution I'm going to implement.
>
> (Which is basically a tweak on one of the solutions I proposed in my
> first message in this thread (with the comment "yuck").  I'm still
> waiting for somebody to correct me that I'm reading the sqlite
> documentation wrong and that you can actually find out the column type
> you're inserting into, because it seems rather absurd that that
> functionality doesn't exist.)

Does the transcript below do what you're looking for?

$ sqlite3
SQLite version 3.37.0 2021-12-09 01:34:53
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> create table foo(x text not null, y blob not null);
sqlite> select * from sqlite_master;
table|foo|foo|2|CREATE TABLE foo(x text not null, y blob not null)
sqlite> .schema sqlite_master
CREATE TABLE sqlite_master (
  type text,
  name text,
  tbl_name text,
  rootpage integer,
  sql text
);
sqlite>





This bug report was last modified 3 years and 22 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.