Re: [sqlite] Valid characters for indentifiers

2017-11-14 Thread Clemens Ladisch
Simon Slavin wrote: > On 14 Nov 2017, at 7:56am, Clemens Ladisch wrote: >> The documentation claims ANSI SQL 1992 compatiblity; all identifiers >> conforming to the standard are supported. > > SQLite is case-insensitive for entity names. SQL92 says that case matters. What I

Re: [sqlite] Valid characters for indentifiers

2017-11-14 Thread Simon Slavin
On 14 Nov 2017, at 7:56am, Clemens Ladisch wrote: > The documentation claims ANSI SQL 1992 compatiblity; all identifiers > conforming to the standard are supported. SQLite is case-insensitive for entity names. SQL92 says that case matters. Simon.

Re: [sqlite] Valid characters for indentifiers

2017-11-13 Thread Clemens Ladisch
Jens Alfke wrote: > On Nov 11, 2017, at 6:31 AM, Simon Slavin wrote: >> There is no documentation for this. Which means that even if you find >> that, say, macrons are allowed in this version, they might not be allowed >> in the next version. > > Um, really? That sounds bad

Re: [sqlite] Valid characters for indentifiers

2017-11-13 Thread Simon Slavin
On 13 Nov 2017, at 7:33pm, Jens Alfke wrote: > On Nov 11, 2017, at 6:31 AM, Simon Slavin wrote: > >> There is no documentation for this. Which means that even if you find that, >> say, macrons are allowed in this version, they might not be allowed

Re: [sqlite] Valid characters for indentifiers

2017-11-13 Thread Jens Alfke
> On Nov 11, 2017, at 6:31 AM, Simon Slavin wrote: > > There is no documentation for this. Which means that even if you find that, > say, macrons are allowed in this version, they might not be allowed in the > next version. Um, really? That sounds bad for

Re: [sqlite] Valid characters for indentifiers

2017-11-12 Thread Kees Nuyt
On Sun, 12 Nov 2017 10:19:03 +0100, Clemens Ladisch wrote: > Kees Nuyt wrote: >> It conforms to the SQL standard, you can use the Postgresql docs >> as a reference. > > Actually, neither SQLite nor PostgreSQL conform to the SQL standard. > [...] Thanks for the heads-up! --

Re: [sqlite] Valid characters for indentifiers

2017-11-12 Thread Klaas Van B.
Bart Smissaert wrote on Sat, 11 Nov 2017 11:04:37>What are the exact rules for valid identifier names (tables, columns and indexes)? Enclosed in double quotes practically anything, but using special characters like /,@,;,#,+,*,% are not really recommended, just as using key-words ("TABLE",

Re: [sqlite] Valid characters for indentifiers

2017-11-12 Thread Clemens Ladisch
Kees Nuyt wrote: > It conforms to the SQL standard, you can use the Postgresql docs > as a reference. Actually, neither SQLite nor PostgreSQL conform to the SQL standard. The SQL standard requires that delimited identifiers are case sensitive and can contain double quotes, and that undelimited

Re: [sqlite] Valid characters for indentifiers

2017-11-11 Thread R Smith
On 2017/11/11 7:23 PM, Bart Smissaert wrote: Yes, that this is mainly for SQLite and thanks for explaining and that is what I thought. I think square brackets are better than double quotes as it looks better and parsing SQL gets easier as the opening and closing character are not the same. But

Re: [sqlite] Valid characters for indentifiers

2017-11-11 Thread Richard Hipp
On 11/11/17, R Smith wrote: > > Further to this, an Identifier can remain unquoted (plain text), except: > > - when it is the same as an SQLite Keyword. Correct. Unfortunately, we do occasionally add new keywords. The most recent example is version 3.8.3 (2014-02-03)

Re: [sqlite] Valid characters for indentifiers

2017-11-11 Thread Bart Smissaert
Yes, that this is mainly for SQLite and thanks for explaining and that is what I thought. I think square brackets are better than double quotes as it looks better and parsing SQL gets easier as the opening and closing character are not the same. But then for compatibility with other DB's double

Re: [sqlite] Valid characters for indentifiers

2017-11-11 Thread R Smith
On 2017/11/11 6:43 PM, Simon Slavin wrote: On 11 Nov 2017, at 4:40pm, Kees Nuyt wrote: It conforms to the SQL standard, you can use the Postgresql docs as a reference. https://www.postgresql.org/docs/7.1/static/sql-syntax.html#SQL-SYNTAX-IDENTIFIERS "the SQL standard

Re: [sqlite] Valid characters for indentifiers

2017-11-11 Thread R Smith
On 2017/11/11 1:04 PM, Bart Smissaert wrote: What are the exact rules for valid identifier names (tables, columns and indexes)? This is both for names enclosed in square brackets ([]) or double quotes (") and also for names that are not enclosed within square brackets or double quotes. The

Re: [sqlite] Valid characters for indentifiers

2017-11-11 Thread Simon Slavin
On 11 Nov 2017, at 4:40pm, Kees Nuyt wrote: > It conforms to the SQL standard, you can use the Postgresql docs > as a reference. > > https://www.postgresql.org/docs/7.1/static/sql-syntax.html#SQL-SYNTAX-IDENTIFIERS "the SQL standard will not define a key word that contains

Re: [sqlite] Valid characters for indentifiers

2017-11-11 Thread Kees Nuyt
On Sat, 11 Nov 2017 11:04:37 +, Bart Smissaert wrote: > What are the exact rules for valid identifier names (tables, columns and > indexes)? > This is both for names enclosed in square brackets ([]) or double quotes > (") and also for names > that are not enclosed

Re: [sqlite] Valid characters for indentifiers

2017-11-11 Thread Simon Slavin
On 11 Nov 2017, at 11:04am, Bart Smissaert wrote: > What are the exact rules for valid identifier names (tables, columns and > indexes)? There is no documentation for this. Which means that even if you find that, say, macrons are allowed in this version, they might

[sqlite] Valid characters for indentifiers

2017-11-11 Thread Bart Smissaert
What are the exact rules for valid identifier names (tables, columns and indexes)? This is both for names enclosed in square brackets ([]) or double quotes (") and also for names that are not enclosed within square brackets or double quotes. Had a good look for this, but couldn't find a clear