Re: [sqlite] althttpd.c check-in: efdc1b8e66

2019-04-27 Thread Carl Chave
> -SNIP- > > You do actually have to have the name of the CGI script in there. > Otherwise, althttpd has know way of knowing what script to run. > Thanks for the explanations, comprehend all. > > > > Test #5: > > Browser URL: http://127.0.0.1:8080/home/index.cgi/some/extra/path/info/ > >

Re: [sqlite] althttpd.c check-in: efdc1b8e66

2019-04-27 Thread Richard Hipp
On 4/27/19, Jungle Boogie wrote: > > Would you ever consider adding support to list an index of a directory? > http://127.0.0.1/files would display whatever is in the /files directory. Probably not. That seems to violate the keep-it-simple principle of althttpd. On the rare occasions where a

Re: [sqlite] althttpd.c check-in: efdc1b8e66

2019-04-27 Thread Jungle Boogie
On Sat 27 Apr 2019 7:44 AM, Richard Hipp wrote: On 4/26/19, Carl Chave wrote: Should "index.cgi" from line number 1923 in subject check in include a leading forward slash? My index.cgi scripts aren't being found with this version (or any subsequent version) unless I explicitly include it as

Re: [sqlite] String interpreted as a column name when creating an index

2019-04-27 Thread Richard Hipp
On 4/27/19, Manuel Rigger wrote: > Thanks for your quick and helpful reply! So if I understood correctly, > there is no way to ensure that a string is not interpreted as a column in > an arbitrary expression, right? String literal is always just a string literal in an arbitrary expression.

Re: [sqlite] String interpreted as a column name when creating an index

2019-04-27 Thread Simon Slavin
On 27 Apr 2019, at 8:46pm, Manuel Rigger wrote: > INSERT INTO test(c0, c1) VALUES ("c1", 0); Technically, SQLite should return an error for that, since you supplied an entity name "c1" where it wanted an expression. For historical compatibility reasons, SQLite will accept the "c1" and

Re: [sqlite] String interpreted as a column name when creating an index

2019-04-27 Thread Manuel Rigger
Thanks for your quick and helpful reply! So if I understood correctly, there is no way to ensure that a string is not interpreted as a column in an arbitrary expression, right? In another example, it was the other way around and I had to use single quotes rather than double quotes to prevent the

Re: [sqlite] String interpreted as a column name when creating an index

2019-04-27 Thread Richard Hipp
On 4/27/19, Manuel Rigger wrote: > > when executing the example below, I get "Error: no such column: asdf". This > behavior is surprising to me, as I would have expected "asdf" to be > interpreted as a string and not as a column name. > > CREATE TABLE test (c0); > CREATE INDEX index_1 ON

[sqlite] String interpreted as a column name when creating an index

2019-04-27 Thread Manuel Rigger
Hi everyone, when executing the example below, I get "Error: no such column: asdf". This behavior is surprising to me, as I would have expected "asdf" to be interpreted as a string and not as a column name. CREATE TABLE test (c0); CREATE INDEX index_1 ON test('asdf'); According to the docs,

Re: [sqlite] althttpd.c check-in: efdc1b8e66

2019-04-27 Thread Richard Hipp
On 4/27/19, Carl Chave wrote: >> Fixed. > > Thanks! > >> Now with two users, maybe it is time to separate the >> althttpd.c code and documentation out into a separate repository >> (rather than commingling it with the SQLite documentation), get a >> domain name, and set up a website just for

Re: [sqlite] Custom collation of blobs

2019-04-27 Thread James K. Lowden
On Fri, 26 Apr 2019 10:36:34 -0700 Jens Alfke wrote: > The only workaround I can think of is to define a custom function > that converts a blob to a string and collate using those strings ? > e.g. `? ORDER BY collatable_blob(b)`. But this requires expensive > string conversions, Your UDF need

Re: [sqlite] althttpd.c check-in: efdc1b8e66

2019-04-27 Thread Carl Chave
> Fixed. Thanks! > Now with two users, maybe it is time to separate the > althttpd.c code and documentation out into a separate repository > (rather than commingling it with the SQLite documentation), get a > domain name, and set up a website just for althttpd.c :-) Sounds good to me, though

Re: [sqlite] Custom collation of blobs

2019-04-27 Thread R Smith
To add to Dominique's suggestion, we use this approach a lot and have sort of standardized it internally. Of course 1NF dictates that this is not the real RDBMS way, but sometimes you need blobs because you just do. I'm sure you already have figured out how to do it sans blob collations, and

Re: [sqlite] sqlite3 java.lang.IllegalStateException: SQLite JDBC: inconsistent internal state

2019-04-27 Thread Simon Slavin
On 27 Apr 2019, at 10:47am, Frank Kemmer wrote: > I can connect to the database, create a table, select from the table, insert > into the table, but the first time I try to read after an insert I get the > following exception: Are you checking the result codes from all these operations ? If

Re: [sqlite] althttpd.c check-in: efdc1b8e66

2019-04-27 Thread Richard Hipp
On 4/26/19, Carl Chave wrote: > Should "index.cgi" from line number 1923 in subject check in include a > leading forward slash? My index.cgi scripts aren't being found with > this version (or any subsequent version) unless I explicitly include > it as part of the request uri. I added the slash

[sqlite] sqlite3 java.lang.IllegalStateException: SQLite JDBC: inconsistent internal state

2019-04-27 Thread Frank Kemmer
I am using: - sqlline-1.7.0-jar-with-dependencies.jar - sqlite-jdbc-3.27.2.jar I can connect to the database, create a table, select from the table, insert into the table, but the first time I try to read after an insert I get the following exception: 0: jdbc:sqlite:/maxmin> SELECT * FROM

[sqlite] althttpd.c check-in: efdc1b8e66

2019-04-27 Thread Carl Chave
Hello, Should "index.cgi" from line number 1923 in subject check in include a leading forward slash? My index.cgi scripts aren't being found with this version (or any subsequent version) unless I explicitly include it as part of the request uri. I added the slash and recompiled and it started

Re: [sqlite] Custom collation of blobs

2019-04-27 Thread Dominique Devienne
On Fri, Apr 26, 2019 at 7:36 PM Jens Alfke wrote: > We are using SQLite blobs to store some structured values, and need > control over how they are collated in queries, i.e. memcmp is not the > correct ordering. We’ve registered a custom collating function, but > unfortunately it doesn’t get