Re: [sqlite] Why Error: ambiguous column name: ProjID

2019-02-11 Thread Jose Isaias Cabrera
Simon Slavin, on Monday, February 11, 2019 11:53 AM, wrote... >On 11 Feb 2019, at 4:51pm, Jose Isaias Cabrera wrote: > >> Thanks. Yes, sometimes I should revise 3 or 4 times before asking. :-) As >> soon as I sent it, I figured it out. > >It wouldn't help. You can read it ten time, rewrite it

[sqlite] MySQL Dumps into SQLite

2019-02-11 Thread Stephen Chrzanowski
This is a dump from a MySQL table I created a few years ago. I'm not moving this particular database into SQLite, but, from what I learned today about MySQL dumps and the commenting system, I was kind of interested on how SQLite would handle the rest of the following statement: CREATE TABLE

Re: [sqlite] MySQL Dumps into SQLite

2019-02-11 Thread J. King
On February 11, 2019 2:19:27 PM EST, Stephen Chrzanowski wrote: >This is a dump from a MySQL table I created a few years ago. I'm not >moving this particular database into SQLite, but, from what I learned >today >about MySQL dumps and the commenting system, I was kind of interested >on >how

Re: [sqlite] Why Error: ambiguous column name: ProjID

2019-02-11 Thread Jose Isaias Cabrera
J. King, on Monday, February 11, 2019 11:25 AM, wrote... >On February 11, 2019 11:16:32 AM EST, Jose Isaias Cabrera >wrote: >> >>This SQL, >> >>SELECT a.*,b.*,c.Area,d.Bus_Area FROM Master_Project_List AS a >>LEFT JOIN Master_Project_List_Extra AS b ON a.ProjID = b.ProjID >>LEFT

Re: [sqlite] MySQL Dumps into SQLite

2019-02-11 Thread Stephen Chrzanowski
Ah yes. I forgot about that. I don't use WITHOUT ROWID typically, so it didn't enter the thought process. On Mon, Feb 11, 2019 at 2:29 PM J. King wrote: > On February 11, 2019 2:19:27 PM EST, Stephen Chrzanowski < > pontia...@gmail.com> wrote: > >This is a dump from a MySQL table I created a

Re: [sqlite] Why Error: ambiguous column name: ProjID

2019-02-11 Thread Simon Slavin
On 11 Feb 2019, at 4:51pm, Jose Isaias Cabrera wrote: > Thanks. Yes, sometimes I should revise 3 or 4 times before asking. :-) As > soon as I sent it, I figured it out. It wouldn't help. You can read it ten time, rewrite it three times, and explain it to your pet duck. You still won't

[sqlite] Problem to understand "Persistent Loadable Extensions"

2019-02-11 Thread Ricardo Torquato
Hey guys! According to "Persistent Loadable Extensions” topic on https://www.sqlite.org/loadext.html if the initialization procedure returns SQLITE_OK_LOAD_PERMANENTLY (256) the extension should persist on the database file instead of just belong to the current connection. So I’ve downloaded

[sqlite] lost errors on writeback/fsync/close - does SQLite need to be fixed similary to PostgreSQL?

2019-02-11 Thread Edwin Török
Hi, I was wondering what changes SQLite3 would need in light of the fsync problems discovered by the PostgreSQL community (see "How is it possible that PostgreSQL used fsync incorrectly for 20 years, and what we'll do about it" talk [1]). [2] lists that MySQL and MongoDB did some changes, has

[sqlite] why no unique columns on alter table

2019-02-11 Thread Mark Wagner
This is mainly for my curiosity. Is there any particular reason that one can't add a unique column on an alter table? With a default value of null they would all have unique values by default. Any insight into this would be great. Perhaps there' something obvious I'm missing. -- Mark

Re: [sqlite] lost errors on writeback/fsync/close - does SQLite need to be fixed similary to PostgreSQL?

2019-02-11 Thread Rowan Worth
Huh, fascinating stuff. I'm not an sqlite developer but I can shed light on some of your questions. On Tue, 12 Feb 2019 at 09:54, Edwin Török wrote: > A very conservative interpretation of various fsync bugs in various OS > kernels [2][5] would suggest that: > > #1. the list of known OS issues

Re: [sqlite] Can I assign negative value to the INTEGER PRIMARY KEY column?

2019-02-11 Thread Richard Hipp
On 2/11/19, J. King wrote: > > Rowids are signed integers and can be negative. The documentation does > advise (somewhere...) against using negative rowids because they are larger > (when stored) than the typical used range of positive ones, but that's it. Exactly. Negative rowids work fine.

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

2019-02-11 Thread Jonas Bülow
Dominique, what I said was that it is undefined behaviour in C++ to return a *value* in a void function. That is still true. On Mon, Feb 11, 2019 at 2:49 PM Dominique Devienne wrote: > On Mon, Feb 11, 2019 at 1:11 PM Clemens Ladisch > wrote: > > > Peter da Silva wrote: > > > I am pretty sure

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

2019-02-11 Thread Jonas Bülow
The subject should say "3.27.1". Sorry! On Mon, Feb 11, 2019 at 11:14 AM Jonas Bülow wrote: > Just tried to update my sqlite version from 3.24 to 3.27.1 and the > compiler complained about a void function returning a value. I don't know > about C, but in C++ this is undefined behaviour and the

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

2019-02-11 Thread Jonas Bülow
I'm using cl.exe v19.12. To summarize: SQLite 3.24 compiles fine with warning as error enabled with cl.exe v19.12 SQLite 3.27.1 does not compile with warning as error enabled with cl.exe v19.12. To me, it looks like a simple fix to avoid writing "return " in void functions even if is a void

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

Re: [sqlite] Can I assign negative value to the INTEGER PRIMARY KEY column?

2019-02-11 Thread J. King
On February 11, 2019 8:35:57 AM EST, John Smith wrote: >Hi, > > >I read in SQLite documentation that if I define column of type INTEGER >PRIMARY KEY then this column will become an alias to SQLite internal >64-bit integer index that uniquely identifies the row (hence ‘rowid’). > >I also read that

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

2019-02-11 Thread Dominique Devienne
On Mon, Feb 11, 2019 at 1:11 PM Clemens Ladisch wrote: > Peter da Silva wrote: > > I am pretty sure that the code is not legal C > > Indeed; C99 and C11 say in 6.3.2.2: > | The (nonexistent) value of a void expression (an expression that has > | type void) shall not be used in any way [...] >

Re: [sqlite] Was there an announcement of 3.27?

2019-02-11 Thread Dan Kennedy
On 9/2/62 03:31, Dominique Pellé wrote: David Raymond wrote: SQLite version 3.27.1 is now available on the SQLite website: https://sqlite.org/ https://sqlite.org/download.html https://sqlite.org/releaselog/3_27_1.html Release notes https://sqlite.org/releaselog/3_27_1.html say:

[sqlite] Can I assign negative value to the INTEGER PRIMARY KEY column?

2019-02-11 Thread John Smith
Hi, I read in SQLite documentation that if I define column of type INTEGER PRIMARY KEY then this column will become an alias to SQLite internal 64-bit integer index that uniquely identifies the row (hence ‘rowid’). I also read that the initial default value that will be used for such column

Re: [sqlite] Displaying hierarchical structure

2019-02-11 Thread Bart Smissaert
Ignore this. Was mailed over 1w ago and only came through and I have figured this out after studying the CTE documentation on the SQLite site. RBS On Wed, Feb 6, 2019 at 7:24 PM Bart Smissaert wrote: > > I can select the rank as in the previous e-mail with this recursive query: > > with

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

2019-02-11 Thread Dominique Devienne
On Mon, Feb 11, 2019 at 11:16 AM Jonas Bülow wrote: > > Just tried to update my sqlite version from 3.24 to 3.27.1 and the > > compiler complained about a void function returning a value. I don't know > > about C, but in C++ this is undefined behaviour and the clang compiler > > sometimes

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

2019-02-11 Thread Dominique Devienne
On Mon, Feb 11, 2019 at 11:31 AM Jonas Bülow wrote: > Sorry, I missed some information. It is the MSVC v15.5 compiler that > complains: > > sqlite3.c(58167): error C2220: warning treated as error - no 'object' file > generated [c:\work\sqlite-amalgamation-3270100\sqlite3.vcxproj] >

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

2019-02-11 Thread Richard Damon
> On Feb 11, 2019, at 6:33 AM, Peter da Silva wrote: > > 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

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

2019-02-11 Thread Clemens Ladisch
Peter da Silva wrote: > I am pretty sure that the code is not legal C Indeed; C99 and C11 say in 6.3.2.2: | The (nonexistent) value of a void expression (an expression that has | type void) shall not be used in any way [...] and in 6.8.6.4: | A return statement with an expression shall not appear

[sqlite] sqlite 3.37.1: void function returns value

2019-02-11 Thread Jonas Bülow
Just tried to update my sqlite version from 3.24 to 3.27.1 and the compiler complained about a void function returning a value. I don't know about C, but in C++ this is undefined behaviour and the clang compiler sometimes generate an ud2 instruction for such code. It's on line 58165 in

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

2019-02-11 Thread Jonas Bülow
Sorry, I missed some information. It is the MSVC v15.5 compiler that complains: sqlite3.c(58167): error C2220: warning treated as error - no 'object' file generated [c:\work\sqlite-amalgamation-3270100\sqlite3.vcxproj] sqlite3.c(58167): warning C4098: 'sqlite3PagerSnapshotUnlock': 'void' function

[sqlite] Why Error: ambiguous column name: ProjID

2019-02-11 Thread Jose Isaias Cabrera
This SQL, SELECT a.*,b.*,c.Area,d.Bus_Area FROM Master_Project_List AS a LEFT JOIN Master_Project_List_Extra AS b ON a.ProjID = b.ProjID LEFT JOIN Bus_IT_Areas_ORGs AS c ON a.IT_OBS = c.IT_OBS LEFT JOIN Business_OBS_List AS d ON a.Business_OBS = d.Bus_OBS WHERE ProjID IN

Re: [sqlite] Why Error: ambiguous column name: ProjID

2019-02-11 Thread Jose Isaias Cabrera
Never mind. Sorry guys for the wasted bandwidth. From: sqlite-users on behalf of Jose Isaias Cabrera Sent: Monday, February 11, 2019 11:16 AM To: sqlite-users@mailinglists.sqlite.org Subject: [sqlite] Why Error: ambiguous column name: ProjID This SQL,

Re: [sqlite] Why Error: ambiguous column name: ProjID

2019-02-11 Thread J. King
On February 11, 2019 11:16:32 AM EST, Jose Isaias Cabrera wrote: > >This SQL, > >SELECT a.*,b.*,c.Area,d.Bus_Area FROM Master_Project_List AS a >LEFT JOIN Master_Project_List_Extra AS b ON a.ProjID = b.ProjID >LEFT JOIN Bus_IT_Areas_ORGs AS c ON a.IT_OBS = c.IT_OBS >LEFT JOIN