Re: [sqlite] [OT] UTF8-BOM and text encoding detection (was: UTF8-BOM not disregarded in CSV import)

2017-06-29 Thread Peter da Silva
I always saw byte as something that was relevant for systems that could address objects smaller than words... “byte addressed” machines. The term was mnemonic for something bigger than a bit and smaller than a word. It was usually 8 bits =but there were 36-bit machines that were byte

Re: [sqlite] [OT] UTF8-BOM and text encoding detection (was: UTF8-BOM not disregarded in CSV import)

2017-06-29 Thread Simon Slavin
On 29 Jun 2017, at 8:01pm, Warren Young wrote: > We wouldn’t have needed the term “octet” if “byte” always meant “8 bits”. The terms "octet" and "decade" were prevalent across Europe in the 1970s. Certainly we used them both when I was first learning about computers. My

Re: [sqlite] [OT] UTF8-BOM and text encoding detection (was: UTF8-BOM not disregarded in CSV import)

2017-06-29 Thread Warren Young
On Jun 29, 2017, at 11:18 AM, Simon Slavin wrote: > > On 29 Jun 2017, at 5:39pm, Warren Young wrote: > >> Before roughly the mid 1970s, the size of a byte was whatever the computer >> or communications system designer said it was. > > You mean that

Re: [sqlite] [OT] UTF8-BOM and text encoding detection (was: UTF8-BOM not disregarded in CSV import)

2017-06-29 Thread John McKown
On Thu, Jun 29, 2017 at 12:18 PM, Simon Slavin wrote: > A couple of minor comments. > > On 29 Jun 2017, at 5:39pm, Warren Young wrote: > > > Before roughly the mid 1970s, the size of a byte was whatever the > computer or communications system designer

Re: [sqlite] [OT] UTF8-BOM and text encoding detection (was: UTF8-BOM not disregarded in CSV import)

2017-06-29 Thread Simon Slavin
On 29 Jun 2017, at 6:18pm, Simon Slavin wrote: > Computers with 16-bit word sizes might encode ASCII as three 5-bit characters Where I wrote "ASCII" I should have written "text". Simon. ___ sqlite-users mailing list

Re: [sqlite] [OT] UTF8-BOM and text encoding detection (was: UTF8-BOM not disregarded in CSV import)

2017-06-29 Thread Simon Slavin
A couple of minor comments. On 29 Jun 2017, at 5:39pm, Warren Young wrote: > Before roughly the mid 1970s, the size of a byte was whatever the computer or > communications system designer said it was. You mean that size of a word. The word "byte" means "by eight". It did

Re: [sqlite] INSERT ... VALUES / want to "skip" default values

2017-06-29 Thread Jens Alfke
> On Jun 29, 2017, at 12:13 AM, Hick Gunter wrote: > > Double quotes is specifically for building identifiers that "look strange" > (i.e. embedded spaces, keywords, ...) which IMHO should be avoided because it > tends to clutter up the statement. I agree that if you’re

Re: [sqlite] [OT] UTF8-BOM and text encoding detection (was: UTF8-BOM not disregarded in CSV import)

2017-06-29 Thread Warren Young
On Jun 27, 2017, at 3:02 PM, Keith Medcalf wrote: > >> The whole point of >> specifying a format as 7 bits is that the 8th bit is ignored, or >> perhaps used in an implementation-defined manner, regardless of whether >> the 8th bit in a char is available or not. > > ASCII

Re: [sqlite] UTF8-BOM and text encoding detection (was: UTF8-BOM not disregarded in CSV import)

2017-06-29 Thread Tim Streater
On 29 Jun 2017 at 08:01, Eric Grange wrote: >> The sender, however, could be lying, and this needs to be considered > > This is an orthogonal problem: if the sender is sending you data that is > not what it should be, then he could just as well be sending you > well-encoded

Re: [sqlite] Cannot delete a Database file?

2017-06-29 Thread Warren Young
On Jun 28, 2017, at 8:53 AM, R Smith wrote: > > > On 2017/06/28 4:33 PM, Simon Slavin wrote: >> That’s two wrong things I’ve posted today. Must try harder. Sorry about >> that. > > I don't think that's a problem… It’s a well-known phenomenon, called by some Cunningham’s

Re: [sqlite] User Authentication Extension is broken in 3.19 branch

2017-06-29 Thread Warren Young
On Jun 28, 2017, at 1:18 AM, Thien, Christoph wrote: > > The last release with working user authentication is 3.15.2. > Release 3.16.0 breaks user authentication. > > There had been a lot of changes between those releases. The version control system that SQLite is

Re: [sqlite] INSERT ... VALUES / want to "skip" default values

2017-06-29 Thread Peter da Silva
On 6/29/17, 5:20 AM, "sqlite-users on behalf of R Smith" wrote: > SQLite isn't helping the confusion in this case, because it allows > double-quotes to be regarded as string values IF an identifier with that name >

Re: [sqlite] INSERT ... VALUES / want to "skip" default values

2017-06-29 Thread Peter da Silva
On 6/29/17, 1:22 AM, "sqlite-users on behalf of Robert M. Münch" wrote: > Hi, sorry, should have mentioned that this doesn't work in my case, because > we are building the column placeholders dynamically.

Re: [sqlite] INSERT ... VALUES / want to "skip" default values

2017-06-29 Thread R Smith
On 2017/06/29 8:15 AM, Robert M. Münch wrote: On 27 Jun 2017, at 22:11, David Raymond wrote: Single quotes should be used for strings, so DEFAULT '-' I thought it doesn't matter if I use " or ' for strings. What's the difference? I had this misconception at some point too. Double quotes

Re: [sqlite] INSERT ... VALUES / want to "skip" default values

2017-06-29 Thread Hick Gunter
Double quotes is specifically for building identifiers that "look strange" (i.e. embedded spaces, keywords, ...) which IMHO should be avoided because it tends to clutter up the statement. Single quotes is for building strings. Integer is a keyword, "integer" is an identifier and 'integer' a

Re: [sqlite] UTF8-BOM and text encoding detection (was: UTF8-BOM not disregarded in CSV import)

2017-06-29 Thread Eric Grange
> The sender, however, could be lying, and this needs to be considered This is an orthogonal problem: if the sender is sending you data that is not what it should be, then he could just as well be sending you well-encoded and well-formed but invalid data, or malware, or confidential/personal data

Re: [sqlite] INSERT ... VALUES / want to "skip" default values

2017-06-29 Thread Clemens Ladisch
Robert M. Münch wrote: > Is this behaviour standard or a SQLite variant? Autoincrementing is an SQLite variant. Default values are standard SQL. It should be noted that standard SQL (above Entry SQL level) allows DEFAULT in row value constructors. Regards, Clemens

Re: [sqlite] INSERT ... VALUES / want to "skip" default values

2017-06-29 Thread Robert M. Münch
On 28 Jun 2017, at 14:51, Simon Slavin wrote: > Really ? In that case I withdraw my previous answer. I thought that NULLs > were converted to the default value for a column (which is usually NULL but > can be overridden with a DEFAULT clause). I had exactly the same understanding. BTW: Is

Re: [sqlite] INSERT ... VALUES / want to "skip" default values

2017-06-29 Thread Robert M. Münch
On 28 Jun 2017, at 9:49, Maks Verver wrote: > I'm surprised nobody mentioned that you can specify the columns to be > inserted in the query: > > INSERT INTO test(a, c, d) VALUES (1, 2 3); > > (Note that `b` is missing it `a, c, d`. It will take the default value, > which will be NULL, unless a

Re: [sqlite] INSERT ... VALUES / want to "skip" default values

2017-06-29 Thread Robert M. Münch
On 27 Jun 2017, at 22:24, David Raymond wrote: > If you have to provide 4 values then the way you can use null to do that is > to add in a trigger to set the default, since NULL _is_ a value and _is_ > legal for that field. Ha, that's a very good idea. I didn't have triggers in the radar.

Re: [sqlite] INSERT ... VALUES / want to "skip" default values

2017-06-29 Thread Robert M. Münch
On 27 Jun 2017, at 22:11, David Raymond wrote: > Single quotes should be used for strings, so DEFAULT '-' I thought it doesn't matter if I use " or ' for strings. What's the difference? > So there is no method to do something like... > > INSERT INTO test VALUES ('field a', DEFAULT, 'field c',