Re: [sqlite] LEFT JOIN: ON vs. WHERE

2019-10-28 Thread James K. Lowden
On Mon, 28 Oct 2019 12:10:38 -0600 "Keith Medcalf" wrote: > CREATE TABLE t1 (a, b); > INSERT INTO t1 VALUES(1,2); > INSERT INTO t1 VALUES(2,3); > INSERT INTO t1 VALUES(1,3); > CREATE TABLE t2 (b, c); > INSERT INTO t2 VALUES(2,3); > INSERT INTO t2 VALUES(3,4); > select * from t1 left join t2 on t1

Re: [sqlite] Single or double quotes when defining alias?

2019-10-28 Thread Thomas Kurz
Ok, thanks for everone's answer. - Original Message - From: James K. Lowden To: sqlite-users@mailinglists.sqlite.org Sent: Monday, October 28, 2019, 18:27:06 Subject: [sqlite] Single or double quotes when defining alias? On Fri, 25 Oct 2019 23:55:20 +0200 Thomas Kurz wrote: > SELECT

Re: [sqlite] LEFT JOIN: ON vs. WHERE

2019-10-28 Thread Keith Medcalf
On Monday, 28 October, 2019 11:19, James K. Lowden wrote: >When wrestling with this topic, it's useful to remember that ON doesn't >constrain the outer table: > > FROM R LEFT OUTER JOIN S > ON R.key = S.key AND R.col = 'foo' >Here, > AND R.col = 'foo' >while valid syntax (u

Re: [sqlite] Single or double quotes when defining alias?

2019-10-28 Thread James K. Lowden
On Fri, 25 Oct 2019 23:55:20 +0200 Thomas Kurz wrote: > SELECT column1 AS 'c' > --or-- > SELECT column2 AS "d" > > On the one hand, the name refers to a column or table identifier. The SQL-92 standard refers to that kind of name as a "correlation name", and its BNF grammar designates a correla

Re: [sqlite] LEFT JOIN: ON vs. WHERE

2019-10-28 Thread James K. Lowden
On Sun, 27 Oct 2019 15:09:03 -0700 Benjamin Asher wrote: > My colleagues and I are trying to understand the role of ON > constraints vs WHERE clauses in JOINs. ON applies before JOIN. WHERE applies after. That's a loose interpretation, but IMO it's nevertheless a useful way to think about i

Re: [sqlite] Roadmap?

2019-10-28 Thread Jens Alfke
> On Oct 27, 2019, at 1:50 PM, Thomas Kurz wrote: > > But not compatible to standards from Open Geospatial Consortium, as far as I > know. That's the nice thing about standards: there are so many of them. > Which requires additional conversions, and considering that geodata usually > have

Re: [sqlite] sqlite segfault bug report

2019-10-28 Thread Simon Slavin
On 28 Oct 2019, at 11:07am, Richard Hipp wrote: > Bisect: Just to explain to the Korean students: you spotted a real bug, but very recently the bug was fixed. However, your work is useful. Please download the current version of SQLite from and continue fu

Re: [sqlite] sqlite segfault bug report

2019-10-28 Thread Richard Hipp
On 10/28/19, Graham Holden wrote: > Monday, October 28, 2019, 5:46:55 AM, ??? wrote: > >> Code: > >> BEGIN; >> CREATE TABLE t1(a); >> ALTER TABLE t1 ADD c CHECK (b>c); >> PRAGMA writable_schema=on; >> INSERT INTO t1 VALUES(2,3); > >> Version: 3.29.0, 3.22.0 > > On "SQLite version 3.30.1 2019-10-1

Re: [sqlite] sqlite segfault bug report

2019-10-28 Thread Graham Holden
Monday, October 28, 2019, 5:46:55 AM, ??? wrote: > Code: > BEGIN; > CREATE TABLE t1(a); > ALTER TABLE t1 ADD c CHECK (b>c); > PRAGMA writable_schema=on; > INSERT INTO t1 VALUES(2,3); > Version: 3.29.0, 3.22.0 On "SQLite version 3.30.1 2019-10-10 20:19:45" this returns an error after the thir

[sqlite] sqlite segfault bug report

2019-10-28 Thread 우병수
Code: BEGIN; CREATE TABLE t1(a); ALTER TABLE t1 ADD c CHECK (b>c); PRAGMA writable_schema=on; INSERT INTO t1 VALUES(2,3); Version: 3.29.0, 3.22.0 Hello, we are students from Korea. We learned about fuzzing and tried to fuzz on sqlite3, and we found a piece of code which makes crash. When