Re: [sqlite] New SQLite Forum established - this mailing list is deprecated

2020-03-13 Thread Peter da Silva
What do you mean there have been "just a few threads" in the mailing list? I can barely keep up with it. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Bug in SQLite version 3.31.1 and 3.32?

2020-03-06 Thread Peter da Silva
> If I change IS NOT FALSE to IS TRUE, the results will be different. I > assume they should perform in the same way? > if you say "NULL IS NOT FALSE" is always true, then 'NULL IS TRUE' should > also be always true. "NULL IS NOT FALSE" is true because NULL is not a value therefor it is not FALSE

Re: [sqlite] Bug in SQLite version 3.31.1 and 3.32?

2020-03-06 Thread Peter da Silva
Change the "(t1.textid = null)" to "(t1.textid IS NULL)". Null has no value, you have to check for it explicitly. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] sqliteDefaultBusyCallback and HAVE_USLEEP

2020-02-26 Thread Peter Kolbus
> On Feb 26, 2020, at 5:53 AM, Graham Holden wrote: > > Wednesday, February 26, 2020, 11:15:14 AM, Richard Hipp > wrote: > >>> On 2/25/20, Peter Kolbus wrote: >>> I noticed that sqliteDefaultBusyCallback() seems to depend directly on the >>> OS

[sqlite] sqliteDefaultBusyCallback and HAVE_USLEEP

2020-02-25 Thread Peter Kolbus
sqliteDefaultBusyCallback() has this dual implementation, and defining HAVE_USLEEP is correct to get better performance on platforms that don’t have usleep()? Or could it be simplified? Thanks, Peter ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http

Re: [sqlite] WITHOUT ROWID tables

2020-02-16 Thread Peter da Silva
If you have control over the schema you can put a schema version in some table. On Sat, Feb 15, 2020, 13:21 J. King wrote: > On February 15, 2020 2:14:30 p.m. EST, Thomas Kurz > wrote: > >Wouldn't be something like > > > >SELECT sql FROM sqlite_master WHERE tbl_name='?' AND type='table' > >cont

Re: [sqlite] What is a "journal"?

2020-01-30 Thread Peter da Silva
In programming a journal is a file or other data structure containing a series of change records but can be replayed to reconstruct an operation. On Thu, 30 Jan 2020, 05:29 Peng Yu, wrote: > Hi, > > https://www.sqlite.org/lockingv3.html#rollback > > "When a process wants to change a database fil

Re: [sqlite] New word to replace "serverless"

2020-01-27 Thread Peter da Silva
Server-free sounds good. Standalone too. Integrated maybe? On Mon, Jan 27, 2020, 17:54 Donald Shepherd wrote: > On Tue, 28 Jan 2020 at 10:19 am, Richard Hipp wrote: > > > daemon-less? > > -- > > D. Richard Hipp > > d...@sqlite.org > > > In-process? Same concept but defining it by what it is rat

Re: [sqlite] New word to replace "serverless"

2020-01-27 Thread Peter da Silva
Local? On Mon, 27 Jan 2020, 16:19 Richard Hipp, wrote: > For many years I have described SQLite as being "serverless", as a way > to distinguish it from the more traditional client/server design of > RDBMSes. "Serverless" seemed like the natural term to use, as it > seems to mean "without a ser

Re: [sqlite] Performance regression since 3.19.0

2020-01-25 Thread Peter Inglesby
6 Jan 2020 at 20:24, Peter Inglesby wrote: > > How does the performance compare with this: >> >> CREATE TABLE t1 (a TEXT, b TEXT); >> CREATE TABLE t2 (a TEXT, b TEXT); >> CREATE INDEX t1_a ON t1 (a,b); >> CREATE INDEX t2_a ON t2 (a,b); >> >> SELECT *

[sqlite] List of innocuous functions?

2020-01-24 Thread Peter Kolbus
Is there any documentation showing, or an easy way to generate, the exact list of SQLite-provided functions that are innocuous? I’d like to turn on the new SQLITE_TRUSTED_SCHEMA but support a variety of applications and am hoping for something to guide analysis. Thanks -Peter

Re: [sqlite] Best way to store key,value pairs

2020-01-14 Thread Peter da Silva
Another thing to consider is that RFC-822/1036 (et seq) headers are not inherently unique and some are repeated, especially since there's software that treats Usenet and Mail headers interchangeably. Also, debugging may require being able to see the exact layout of the headers as received. The safe

Re: [sqlite] Performance regression since 3.19.0

2020-01-06 Thread Peter Inglesby
CREATE TABLE t1 (a TEXT, b TEXT); > CREATE TABLE t2 (a TEXT, b TEXT); > CREATE INDEX t1_a ON t1 (a,b); > CREATE INDEX t2_a ON t2 (a,b); > > SELECT * > FROM t1 LEFT JOIN t2 ON (t1.b=t2.b AND t2.a='123') > WHERE t1.a='123'; > > > On 1/5/20, Peter Inglesby

[sqlite] Performance regression since 3.19.0

2020-01-05 Thread Peter Inglesby
|0|0|SEARCH TABLE t1 USING INDEX t1_a (a=?) 0|1|1|SEARCH SUBQUERY 1 AS s2 USING AUTOMATIC COVERING INDEX (b=?) I have verified that the performance problem exists in the latest checkout. Is there any more information I could provide? Thanks for your work on a great tool! Peter.

Re: [sqlite] Causal profiling

2020-01-01 Thread Peter da Silva
Also spaghetti inheritance is a thing. On Wed, Jan 1, 2020, 19:19 D Burgess wrote: > > I’ve spent too much time lately trying to figure out or debug hellacious > C spaghetti code > > And I’ve spent too much time lately trying to figure out or debug > hellacious C++ spaghetti code > > Someone who

Re: [sqlite] Regarding the whole C89/C90 language compliance debacle ...

2019-11-23 Thread Peter da Silva
Strictly compliant code strictly doesn't need to do anything at all, conforming to strict standards instead of what compilers actually do is an interesting intellectual exercise but is not necessarily useful. On Sat, Nov 23, 2019, 16:27 Dennis Clarke wrote: > > I may be the only person that does

Re: [sqlite] Question about: Adding a record to a table with select failure

2019-11-18 Thread Peter da Silva
Assuming I'm understanding what the original message was about. Isn't this what BEGIN; INSERT OR IGNORE; UPDATE; COMMIT is the right tool for? ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailm

Re: [sqlite] Using application_id

2019-11-18 Thread Peter da Silva
> If you stick to lower or upper case letters, could encode up to 6 chars in > the app_id. --DD The return of RADIX-50. https://en.wikipedia.org/wiki/DEC_Radix-50 ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.s

Re: [sqlite] database disk image is malformed

2019-11-15 Thread Peter da Silva
I have been bitten by this a couple of times, so now I'm super-conservative about how I deal with this. What I do is have any parent database setup done by having the parent spawn a child process to do the actual database work, and return any data the parent needs in the status or (if more than a

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-13 Thread Peter da Silva
a Silva. On Wed, 13 Nov 2019, 15:56 Jose Isaias Cabrera, wrote: > > Peter da Silva, on Wednesday, November 13, 2019 04:37 PM, wrote... > > > > My last name has a space in it. It's been less than a month since the > last > > time it was rejected by a form. One of my

Re: [sqlite] Things you shouldn't assume when you store names

2019-11-13 Thread Peter da Silva
My last name has a space in it. It's been less than a month since the last time it was rejected by a form. One of my oldest online friends has only one name. Assume nothing, permit everything. On Wed, 13 Nov 2019, 15:23 Swithun Crowe, wrote: > Hello > > SS> Those are all excellent examples of wh

Re: [sqlite] Why do these 2 updates give different results?

2019-11-13 Thread Peter da Silva
> > This almost seems like a job for a view. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Table was deleted on macOS

2019-10-15 Thread Peter da Silva
Check the local time machine backups? Even if you don't have a TM backup drive Mojave maintains on-drive backups. On Tue, 15 Oct 2019, 16:54 Simon Slavin, wrote: > Sorry, I have no other ideas. There is no reason for a table to disappear. > ___ > sqli

Re: [sqlite] rationale for private archives of the SQLite mailing list and suppressed reply-to

2019-10-15 Thread Peter da Silva
I think you're conflating things. A mail server speaks SMTP for both inbound and outbound, IMAP/POP/webmail is all part of the user interface stack... as would be the webforum component in any mailing list/web forum scheme. On Mon, 14 Oct 2019, 20:45 Warren Young, wrote: > On Oct 14, 2019, at 3:

Re: [sqlite] Attached databases and union view.

2019-08-22 Thread Peter da Silva
nly a Stairway to Heaven says > a lot about anticipated traffic volume. > > >-Original Message- > >From: sqlite-users [mailto:sqlite-users- > >boun...@mailinglists.sqlite.org] On Behalf Of Peter da Silva > >Sent: Thursday, 22 August, 2019 11:57 > >To: SQLite

Re: [sqlite] Attached databases and union view.

2019-08-22 Thread Peter da Silva
Still a bit over 3x slower on queries but that's a 7x performance improvement. On Thu, Aug 22, 2019 at 11:40 AM Peter da Silva wrote: > Legit. I'll try that. > > On Thu, Aug 22, 2019 at 11:33 AM David Raymond > wrote: > >> I don't know how smart the plann

Re: [sqlite] Attached databases and union view.

2019-08-22 Thread Peter da Silva
Originally Tcl/native Tcl binding, now a C++ extension calling the C-binding that's a Tcl extension itself. On Thu, Aug 22, 2019 at 11:17 AM test user wrote: > What language/binding library are you using? > > On Thu, 22 Aug 2019 at 16:45, Peter da Silva wrote: > > > D

Re: [sqlite] Attached databases and union view.

2019-08-22 Thread Peter da Silva
ION ALL it would be > free to separate all the various subqueries from each other. > > Or do you actually need the UNION to de-dupe stuff? > > > -Original Message- > From: sqlite-users On > Behalf Of Peter da Silva > Sent: Thursday, August 22, 2019 11:28 AM > To:

Re: [sqlite] Attached databases and union view.

2019-08-22 Thread Peter da Silva
Database is on tmpfs and periodically snapshotted to SSD. There are bottlenecks upstream of sqlite that we can see in traces. On Thu, Aug 22, 2019 at 10:36 AM Warren Young wrote: > On Aug 22, 2019, at 9:27 AM, Peter da Silva wrote: > > > > Have an existing application that'

[sqlite] Attached databases and union view.

2019-08-22 Thread Peter da Silva
Have an existing application that's pushing the limit on how fast it can read data and add it to the database, and thinking of sharding the database file so I can have multiple writers writing to shards of the main tables. ATTACH DATABASE 'shard0.sqlite' as shard0; ATTACH DATABASE 'shard1.sqlite'

Re: [sqlite] Backward compatibility vs. new features (was: Re: dates, times and R)

2019-08-13 Thread Peter da Silva
If the datr/time is stored internally as utc iso8601 text then it will remain compatible with old versions and can implement whatever new behavior is needed on new versions. The bigger question is 'what new behavior'? The only nee behavior seems to be 'let this third party package see it as a date'

Re: [sqlite] Unreachable Breaks with ICC on Windows

2019-07-17 Thread Peter da Silva
I would argue that an unreachable break should not be a warning, since leaving out the break is just asking for some beggar to come in and make it reachable again and summon the fallthrough fairy without noticing it. :) On Sat, Jul 13, 2019 at 9:32 AM André Borchert <0xa...@gmail.com> wrote: > He

Re: [sqlite] How to set access permissions to protect a database file?

2019-06-16 Thread Peter da Silva
I don't believe you are providing any protection against editing the file, just deleting. On Sun, Jun 9, 2019, 4:38 PM Markos wrote: > Many thanks to Luuk, Adrian, Graham, James, Simon, Richard and Peter, > > To guarantee "some" protection to the files containing the dat

Re: [sqlite] How to set access permissions to protect a database file?

2019-05-29 Thread Peter da Silva
This is what the UNIX group ID and the set-group-id capability is for. You make the files readable (or read and write) by a group (mode 640 or 660). You make the program that controls access to the files set-group-id to that group. You may need a small "C" wrapper program to run the script set-g

Re: [sqlite] Have SQLite handle values of my own type

2019-05-24 Thread Peter da Silva
Windows TCP/IP userland used to be a port of the BSD networking tools (I think via Lachman Associates) so that's not surprising. Allegedly they reimplemented it at some point. On Thu, May 23, 2019 at 3:57 PM Keith Medcalf wrote: > On Thursday, 23 May, 2019 08:35, Dominique Devienne > wrote: > >

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

2019-05-05 Thread Peter da Silva
> A middle ground is Docker for Windows. I hesitate to speculate on its speed > compared to the other three, but I think there’s reason to hope it could be a > good option. I would expect that running a Linux image inside Microsoft's hypervisor environment and running a Linux image in Docker's

Re: [sqlite] Use cases for sqlite3_value_frombind()?

2019-04-17 Thread Peter da Silva
I don't think I would use this as a security indicator, whether it's a bound parameter or a constant in the query string doesn't tell you if it's from a trusted source or not. This is more an indicator that this value is likely to change in subsequent queries. __

Re: [sqlite] compressed sqlite3 database file?

2019-04-11 Thread Peter da Silva
at happens, let alone using a compressing file system to hold that database. But there's a whole spectrum of embedded systems between that and arcade games. On Wed, Apr 10, 2019 at 5:17 PM Keith Medcalf wrote: > > On Wednesday, 10 April, 2019 14:21, Peter da Silva > wrote: > >

Re: [sqlite] compressed sqlite3 database file?

2019-04-10 Thread Peter da Silva
On Wed, Apr 10, 2019 at 3:12 PM Keith Medcalf wrote: > Why would anyone fart about with added complication and the concomittant > increased unreliability when storage is so damn cheap? > Embedded systems and mobile devices. But of course those probably don't apply here. :) _

Re: [sqlite] compressed sqlite3 database file?

2019-04-10 Thread Peter da Silva
A database trades off space for performance and functionality. It is expected that a database with indexes that you can randomly access is going to take more space than the raw data, let alone a compressed version of the raw data. On Wed, Apr 10, 2019 at 12:39 AM Peng Yu wrote: > I have some TSV

Re: [sqlite] Segmentation fault running a query

2019-03-06 Thread Peter Hardman
uery. The SQLite3 version is SQLite 3.27.1 2019-02-08 13:17:39, built with zlib version 1.2.11 and gcc-8.2.1 20181127. I've attached the database file (300K). Dan Kennedy wrote on 06/03/2019 12:07: On 6/3/62 16:37, Peter Hardman wrote: So, I forgot I had emails from the list turned off

[sqlite] Segmentation fault running a query

2019-03-06 Thread Peter Hardman
- From: sqlite-users [mailto:sqlite-users-bounces at mailinglists.sqlite.org] On Behalf Of Simon Slavin Sent: Tuesday, March 05, 2019 3:14 PM To: SQLite mailing list Subject: Re: [sqlite] Segmentation fault running a query On 5 Mar 2019, at 8:06pm, Peter Hardman wrote: > If i run

[sqlite] Segmentation fault running a query

2019-03-05 Thread Peter Hardman
e dump (the interesting bit only): [peter@system04 ppd-memrpt2]$ coredumpctl info 10267 PID: 10267 (sqlitebrowser) UID: 1000 (peter) GID: 1000 (peter) Signal: 11 (SEGV) Timestamp: Tue 2019-03-05 18:55:38 GMT (55min ago) Command Line: sqlitebrowser

Re: [sqlite] Confused with type mismatch in Tcl interface

2019-02-27 Thread Peter da Silva
One nasty thing you might be able to do in the interim is to shimmer the object to the type you want by doing something like [set x [expr {double $x}]] to make it double. On Wed, Feb 27, 2019 at 9:31 AM Richard Hipp wrote: > On 2/27/19, Jean-Baptiste Gardette wrote: > > have you any explanation

Re: [sqlite] How to refer to `this` table?

2019-02-23 Thread Peter da Silva
As an aside, this schema seems to be violating https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/ particularly rule 21. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-b

[sqlite] Bug: table-valued functions for PRAGMA ignore database names

2019-02-22 Thread Peter Gunold
Hello, I found a bug in sqlite when using table-values pragma functions with attached databases when using the sqlite3.exe for windows. In my tests I found out, that it is not possible to use table-valued pragma functions on attached databases e.g. to read user_version or schema_version. So the Q

Re: [sqlite] sqlite 3.37.1: void function returns value

2019-02-11 Thread Peter da Silva
I am pretty sure that the code is not legal C because it's using the return value of a void function, as well as returning a value from a void function. Compilers that "do what I mean" and accept it are in error. It's certainly possible that some obscure clause in some C standard blesses it but I c

Re: [sqlite] Displaying hierarchical structure

2019-01-31 Thread Peter Johnson
some relevant links: http://dwhoman.com/blog/sql-transitive-closure.html http://charlesleifer.com/blog/querying-tree-structures-in-sqlite-using-python-and-the-transitive-closure-extension/ On Wed, 30 Jan 2019, 4:52 AM Bart Smissaert Working on an Android app and part of that is storing SQL in a

Re: [sqlite] SQLite slow when lots of tables

2019-01-29 Thread Peter da Silva
On Tue, Jan 29, 2019, 7:46 PM Igor Korot You can install mySQL/MariaDB for free and use it for your needs. > I believe that if you pay to Oracle/MariaDB Foundation, it will be > just for support. (I may be wrong though). > Or better, PostgreSQL. We have a system that uses SQLite as an optional ca

Re: [sqlite] WAL mode readonly errors to SELECT statements

2019-01-24 Thread Peter da Silva
The sensible permissions in this case would probably be rw-rw-r-- with the same group as the service and owned by the service group. That is how group permissions were designed to work. > > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.

Re: [sqlite] sqlite-src-3260000 tests throw Error: couldn't fork child process: not enough memory

2019-01-24 Thread Peter da Silva
Sounds like something is using fork when it should be using vfork? ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Question about floating point

2019-01-03 Thread Peter da Silva
nse now. On Thu, Jan 3, 2019 at 5:54 AM Gary R. Schmidt wrote: > On 03/01/2019 22:22, Peter da Silva wrote: > > Why is the exponent in the low bits, since it forces unnecessary shifts > for > > integer operations? > > > That's easy, because the high bits are cl

Re: [sqlite] Question about floating point

2019-01-03 Thread Peter da Silva
Why is the exponent in the low bits, since it forces unnecessary shifts for integer operations? On Thu., 3 Jan. 2019, 03:34 Pavlos Christoforou Happy new year all, > > Have not followed the full thread, in case it has not been mentioned > already: > > http://dec64.com/ > > > Cheers > > > On Tue,

Re: [sqlite] i Know i should use 'AS', but ....

2018-12-24 Thread Peter Johnson
The headers are present in all three queries you pasted. The first result shows two rows, the top row is the header. The other two results show 4 rows each, the top row of each is the header row. -P On Tue, 25 Dec 2018, 3:42 AM Luuk sqlite> .version > SQLite 3.26.0 > > sqlite> .headers on > >

Re: [sqlite] Claimed vulnerability in SQLite: Info or Intox?

2018-12-20 Thread Peter da Silva
Programs that were written defensively from the start are more likely to survive attack. Programs that have successfully been exposed to attack can be treated as more secure. Sqlite is explicitly not designed to be secure against untrusted input or corrupt . This is OK. It's not a program that wou

Re: [sqlite] Claimed vulnerability in SQLite: Info or Intox?

2018-12-20 Thread Peter da Silva
Fuzz testing would be extremely unlikely to have caught the original attack. Nor would fuzz testing on input be likely to hit all corrupt database attacks. Fuzz testing using fuzzed corrupted databases might. On Thu., 20 Dec. 2018, 11:26 Jens Alfke > > > On Dec 19, 2018, at 4:03 PM,

Re: [sqlite] Claimed vulnerability in SQLite: Info or Intox?

2018-12-19 Thread Peter da Silva
sqlite is not immune to wandering through bad pointers, because code coverage tests don't test for malicious data... I found a null pointer crash in sqlite earlier this year. I could see Mallory crafting a database that had carefully corrupted structures in it that smashed the stack. __

Re: [sqlite] Claimed vulnerability in SQLite: Info or Intox?

2018-12-18 Thread Peter da Silva
On Tue, Dec 18, 2018 at 3:49 PM Nathan Green wrote: > Except the problem isn't just in Chrome. Apparently, any system that allows > SQL injection is vulnerable. > That's kind of a tautology isn't it? Isn't there some kind of Godwin's Law variant for XKCD 327? I notice that the 12 points on http

Re: [sqlite] Claimed vulnerability in SQLite: Info or Intox?

2018-12-18 Thread Peter da Silva
Javascript was designed from the start to safely execute malicious code. That doesn't mean it is safe, it just means it might be. There have been all kinds of javascript-based exploits, after all. But an interpreter that was not originally designed to be safe in the face of malicious code? I can't

Re: [sqlite] Claimed vulnerability in SQLite: Info or Intox?

2018-12-18 Thread Peter da Silva
I have to say I'm pretty boggled that Chrome allows hostile users to feed code directly into an SQL interpreter that wasn't written from the ground up to be secure. Secure interpreters are *hard* even when you're designing them from scratch (see also, the whole history of web-based vulnerabilities)

Re: [sqlite] [Question] Non-EXCLUSIVE modes in dot-file locking strategy

2018-12-15 Thread Peter da Silva
The only way I can think of to have a large counter in a lock is to lock access to a file containing a counter and I don't know if not-a-file-system semantics support that. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailingl

Re: [sqlite] Mac: Users receive "database disk image is malformed" errors after restoring database from Time Machine backup

2018-12-12 Thread Peter da Silva
Apple uses Sqlite in a number of applications, including Apple Mail, so they have to have some kind of accommodation for saving sqlite databases. The Time Machine patent does not describe using file system snapshots: *"An algorithm or other monitoring can be used to detect changes that occur dur

Re: [sqlite] Windows app to read SQLite DB, and launch web browser when dbl-clicking a record?

2018-11-04 Thread Peter da Silva
On 2018-10-19, at 09:02, Winfried wrote: > Before I build a GUI, is there a Windows SQLite database manager that can do > this? > > I tried DB Browser for SQLite, SQLitespeed, and SQLiteStudio, but none seems > to support this feature. SQLite's closest thing to a native scripting language is Tcl

Re: [sqlite] forming sqlite3_statements using stored sql

2018-11-03 Thread Peter da Silva
I don't care for the sql variable syntax they're using, since it appears to conflict with the native Tcl bindings for sqlite3. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlit

Re: [sqlite] curious discovery about geopoly module

2018-11-01 Thread Peter da Silva
On 2018-11-01, at 02:51, Graham Hardman wrote: > I am pleased about this, although still puzzled by the fact that the windows > LoadLibrary call returned a non null pointer and windows help file implies > that it is ok for multiple copies of same name libraries to be loaded > together. This ha

Re: [sqlite] Displaying row count

2018-10-31 Thread Peter da Silva
If you're going to change the sqlite3 command shell, add a ".count" and maybe ".changes" display option. On Wed, Oct 31, 2018 at 11:23 AM Don V Nielsen wrote: > I really enjoy using JetBrains DataGrip. It connects to everything and has > great intellisense, find and replace tools, sql templates,

[sqlite] union + window functions = sqlite crash (version 3.25.2)

2018-10-23 Thread Peter Ďurica
fixed Please let me know how it goes Thanks in advacne, Peter Ďurica ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Regarding CoC

2018-10-22 Thread Peter da Silva
You would have had more luck with "Be excellent to each other". ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] segmentation fault in sqlite api call

2018-10-21 Thread Peter da Silva
You're passing a char * to a routine that expects a char **, and then immediately trying to indirect through it, which means it's taking the text, treating it as a pointer, and passing the random data it's pointing to as a string to sqlite. On Sun., 21 Oct. 2018, 11:55 Ratheendran R, wrote: > Hi

Re: [sqlite] [SQLITE]ignoring syntax errors during search for sth include "symbols"

2018-10-18 Thread Peter da Silva
Don't put raw user input where code is expected. Match strongs are code. You need to encapsulate (eg escape) or filter (delete bad characters) match strings outside sqlite. On Thu., 18 Oct. 2018, 13:50 Maziar Parsijani, wrote: > It will crash or exit the program. > > On Thu, Oct 18, 2018 at 2:27

Re: [sqlite] sqlite3_complete and comments

2018-10-14 Thread Peter da Silva
Comments have no effect on the completeness of a statement, you will have to look for leading '--' explicitly. On Sun., 14 Oct. 2018, 13:38 Roger Binns, wrote: > I use sqlite3_complete in my shell in order to determine when a complete > statement has been input and can be run. (Otherwise a cont

Re: [sqlite] SQLite Windows GUI alternative to Excel?

2018-10-07 Thread Peter da Silva
There's a couple of Tcl/Tk SQLITE database managers that could be more easily turned into something like the Access GUI than starting from scratch. And they wouldn't be limited to Windows. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.o

Re: [sqlite] A SQL statement reformatter

2018-09-28 Thread Peter da Silva
eone should have make this tool 20-30 years ago! > On Fri, Sep 28, 2018 at 10:44 AM Peter da Silva wrote: > > > > Pity they aren't making the code available. Not sure I want to send > company > > SQL to a random site. > > > > On Fri, Sep 28, 2018 at 7:48 AM D

Re: [sqlite] A SQL statement reformatter

2018-09-28 Thread Peter da Silva
Pity they aren't making the code available. Not sure I want to send company SQL to a random site. On Fri, Sep 28, 2018 at 7:48 AM Don V Nielsen wrote: > Slick. That line width slider feature is something we don't get using Poor > Man's Sql Formatter. > > Thanks! > > On Thu, Sep 27, 2018 at 7:03

[sqlite] Core dump in sqlite 3.23 through 3.24 (at least)

2018-09-19 Thread Peter Da Silva
In tclsqlite.c, function DbMain()... somewhere between 3.19 and 3.23 there was a re-write of the argument parsing code for the sqlite command, and following code was removed and not completely replaced with a new equivalent: if( objc<3 || (objc&1)!=1 ){ Tcl_WrongNumArgs(interp, 1, objv,

[sqlite] Docs typo JSON1 @ 4.13

2018-09-19 Thread Peter Johnson
Hi, The JSON1 docs at https://www.sqlite.org/json1.html have a minor typo: Section 4.13. The json_each() and json_tree() table-valued functions atom ANY, -- value for primitive types, null for array & object > id INTEGER -- integer ID for this element > parent INTEGER, -- integer ID for the pare

Re: [sqlite] In tea/configure.ac why isn't --with-system-sqlite default on linux?

2018-08-02 Thread Peter Da Silva
This is also a problem on FreeBSD, I just haven’t noticed it because the ports guys are on top of keeping their sqlite3 build up to date, and they do the smart thing and build --with-system-sqlite. If you’re building sqlite-autoconf-3xx/tea, then why would the “system sqlite” ever be anythi

Re: [sqlite] In tea/configure.ac why isn't --with-system-sqlite default on linux?

2018-07-31 Thread Peter Da Silva
> You may be building on a system where they’ve still got SQLite 3.7.mumble > installed In this case there are not two implementations present. Both libsqlite3.24.0.so and libsqlite3.so.0.8.6 were built from sqlite-autoconf-324. This is the only copy of libsqlite3 anywhere on the system. >

[sqlite] In tea/configure.ac why isn't --with-system-sqlite default on linux?

2018-07-30 Thread Peter Da Silva
So I was doing some work with another Tcl extension (Pgtcl) that was linking to libsqlite3. It worked fine on FreeBSD but on Linux (Ubuntu 4.13.0-27 generic) it crashed. We traced that down to it having two copies of libsqlite linked in, the one in the sqlite3 extension (libsqlite3.24.0.so) and

[sqlite] sqlite3_prepare_v2 with an empty statement.

2018-07-24 Thread Peter Da Silva
In the documentation for sqlite3_prepare_v2, it says: *ppStmt is left pointing to a compiled prepared statement that can be executed using sqlite3_step(). If there is an error, *ppStmt is set to NULL. If the input t

Re: [sqlite] CASE and NULL

2018-07-05 Thread Peter Johnson
Can't you just use IFNULL to assign a default value? CASE IFNULL( x, -999 ) WHEN 1 THEN 11 WHEN 2 THEN 22 WHEN 3 THEN 33 WHEN 4 THEN 44 WHEN -999 THEN 55 ELSE 66 END On 5 July 2018 at 11:35, R Smith wrote: > On 2018/07/05 8:44 AM, Simon Slavin wrote: > >> On 5 Jul 2018, at 7:30am, C

Re: [sqlite] FTS4 content table

2018-07-02 Thread Peter Johnson
reat, they introduce some new concepts that are unique to that module and so those nonconanical patterns cause people to make their own assumptions regarding how they are implemented, which was the case here. Thanks again. - Peter On Mon, 2 Jul 2018, 10:02 AM Dan Kennedy, wrote: > On 07/01/2018

Re: [sqlite] FTS4 content table

2018-07-01 Thread Peter Johnson
I recall you must still enumerate the column names of the fields you wish to link to the contentless table when creating the virtual table. If I remember correctly, failing to do so will result in 'no such column' errors. Last time I looked at the docs I got caught with the same gotcha, the docs

Re: [sqlite] Check if the new table has been created

2018-06-19 Thread Peter Johnson
Is it possible to create a trigger on sqlite_master which calls a user-defined function AFTER INSERT? That would avoid having to poll, but it'd still allow the application to be notified when the schema changed. On 19 June 2018 at 20:56, Richard Hipp wrote: > On 6/19/18, Igor Korot wrote: > >

Re: [sqlite] Issue with node-sqlite3

2018-06-13 Thread Peter Johnson
Hi Omer, Unfortunately what you are trying to do it not possible. You are trying to run the npm package `node-sqlite3` in an Angular project. Angular is a front-end, browser-based framework. The npm package manager contains javascript modules which can sometimes be used either in the browser or

Re: [sqlite] Insert with an '

2018-06-11 Thread Peter Nacken
Dear all, Thanks for your help. It works ! Peter > Am 11.06.2018 um 11:14 schrieb Tim Streater : > >> On 11 Jun 2018, at 09:07, Peter Nacken wrote: >> >> I try to insert email addresses into a table and get an error with addresses >> they have a single quota

Re: [sqlite] Insert with an '

2018-06-11 Thread Peter Nacken
Sorry I forgot I‘m using C# > Am 11.06.2018 um 10:07 schrieb Peter Nacken : > > Hi, > > I'm new in SQLite. > > I try to insert email addresses into a table and get an error with addresses > they have a single quotation mark ( na'm...@domain.ltd ). >

[sqlite] Insert with an '

2018-06-11 Thread Peter Nacken
Hi, I'm new in SQLite. I try to insert email addresses into a table and get an error with addresses they have a single quotation mark ( na'm...@domain.ltd ). Sorry I'm facing this problem for weeks, I can't find a solution. Is there a known workaround for it ? Th

[sqlite] query planning - covering indices

2018-05-16 Thread Peter Johnson
I noticed that the query planner favours the primary index when a covering index exists which can satisfy the same query. My understanding is that covering indices are more efficient, as the table itself does not need to be scanned when all the required columns exist in the covering index? Is it

Re: [sqlite] Multi threaded readers on memory sqlite cannot scale

2018-05-15 Thread Peter Da Silva
On 5/15/18, 1:25 AM, "Howard Chu" wrote: Peter Da Silva wrote: > On 5/13/18, 6:48 AM, "sqlite-users on behalf of Howard Chu" wrote: > > SQLightning > > Do you have a link to the currently updated version of this? Google g

Re: [sqlite] Multi threaded readers on memory sqlite cannot scale

2018-05-14 Thread Peter Da Silva
On 5/14/18, 9:17 AM, "sqlite-users on behalf of Bernard Ertl" wrote: Apologies if I muddled the waters here. I read the "SQLightning" response below as SQLitening. I didn't know there was a similarly named project out there. I also can't see the beginning of this discussion to have cont

Re: [sqlite] Multi threaded readers on memory sqlite cannot scale

2018-05-14 Thread Peter Da Silva
Now I'm even more confused, there's "sqlightning" and "sqlitening". Are these different names for the same project? It doesn't seem so. Which was intended? https://github.com/LMDB/sqlightning On 5/14/18, 8:47 AM, "sqlite-users on behalf of Bernard Ertl" wrote: This is the latest:

Re: [sqlite] shell edit quoting

2018-05-14 Thread Peter Da Silva
I think you're in "csv mode": sqlite> select sql from sql_procs where name = 'a'; select * from "mytable" ; sqlite> .header on sqlite> .mode csv sqlite> select sql from sql_procs where name = 'a'; sql "select * from ""mytable"" ; " On 5/13/18, 7:04 PM, "sqlite-users on behalf of David Burgess"

Re: [sqlite] Multi threaded readers on memory sqlite cannot scale

2018-05-14 Thread Peter Da Silva
On 5/13/18, 6:48 AM, "sqlite-users on behalf of Howard Chu" wrote: SQLightning Do you have a link to the currently updated version of this? Google gives me projects that haven't been updated since 2015. ___ sqlite-users mailing list sqlite-user

Re: [sqlite] Always call a value-quoting routine

2018-05-08 Thread Peter Da Silva
Nicely retro-feel website too: https://droptablecompanies.co.uk/ ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Always call a value-quoting routine

2018-05-07 Thread Peter Da Silva
On 5/7/18, 2:14 AM, "sqlite-users on behalf of Scott Robison" wrote: It could just indicate someone with a sense of humor who crafted a name that looks like an injection attack for their company. Most likely, or else it's part of an honor system exploit. http://humorix.org/10277 __

Re: [sqlite] Fossil Delta Compression in SqLite

2018-05-07 Thread Peter Da Silva
On 5/6/18, 11:23 AM, "sqlite-users on behalf of Philip Bennefall" wrote: Only the requirement for attribution in binaries. That can be significant in certain use cases. One line of text in the documentation provided with the distribution doesn't seem burdensome. It's not like the adve

Re: [sqlite] Configuring csv extension to use '; ' as column delimiter instead of ',' ?

2018-05-01 Thread Peter Da Silva
On 5/1/18, 1:42 PM, "sqlite-users on behalf of R Smith" wrote: My point is that CSV was not necessarily "meant" to be what you say. Who exactly "meant" for it to be that? Because the official stuff makes no such claim or mention. Bah. Existential shenanigans. There's probably so

Re: [sqlite] Configuring csv extension to use '; ' as column delimiter instead of ',' ?

2018-05-01 Thread Peter Da Silva
On 5/1/18, 1:15 PM, "sqlite-users on behalf of R Smith" wrote: On 1 May 2018, at 6:43pm, Peter Da Silva wrote: > CSV is an interchange format, it's for software to communicate with other software, so the syntax needs to be independent of the locale since you

Re: [sqlite] Configuring csv extension to use '; ' as column delimiter instead of ',' ?

2018-05-01 Thread Peter Da Silva
To another post hating on Excel - Excel has many flaws, but this is not one of them, it's a fault of the list-separator setting in the Windows OS on which the Excel runs. CSV is an interchange format, it's for software to communicate with other software, so the syntax needs to be in

  1   2   3   4   5   6   7   8   >