Hi,
I really like the way the SQL syntax diagrams are done (e.g. at
http://www.sqlite.org/syntaxdiagrams.html). What software did you use for it?
Regards
Andy
_
We want to hear all your f
Hello,
Is it alright to ask a quick question about the lemon parser in this mailing
list, or is there a dedicated one which I should post this to instead?
I'm using lemon to create a parser for a simple c/basic-like grammar, and have
among other rules, the following defined (I've trimmed it down
iate its not an
Sqlite question, but I don't know where else to post questions about
Lemon.
Thanks!!!
Andy
- Original Message -
From: "Andy Gibbs"
Sent: Wednesday, March 10, 2010 10:54 AM
Subject: Question about lemon
> Hello,
>
> Is it alright to ask a quick
Hi Allan,
> Instead of adding the definition
>
> cmd ::= set_item.
>
> have you thought about defining the acceptable alternatives to "SET"?
> For instance,
>
> set ::= SET.
> set ::= .
> cmd ::= set set_list.
Thank you for the suggestion. I have just tried this and unfortunately, it
doesn't wo
Hi,
I notice in the fossil repository that Sqlite is now moving towards version
3.7.0. According to the page http://www.sqlite.org/news.html#2009_sep_11, it
is anticipated that recursive triggers will be enabled by default from version
3.7.0 (cf also http://www.sqlite.org/limits.html#max_trigg
From: "Simon Slavin"
Sent: Monday, April 26, 2010 2:31 PM
> I don't know the answer to this question, but I have considered it in one
> of my
> programs. It simply issues a "PRAGMA recursive_triggers = 'on'", then
> does a
> "PRAGMA recursive_triggers" and looks to see what it gets back. Anythi
I don't think there is anything in the vanilla sqlite to do this, but...
Have a look at src/test8.c in the main (not amalgamation) source code...
this may give you some ideas. I don't think it does what you want exactly,
but a quick skim through makes me think it has some pointers in the right
How about hitting your injection problem from the other side? Perhaps you
can validate the data that is going in to making up your query.
I don't know what query in particular you are using, but it made me think
and something that cannot work with parameterisation could be something like
the f
Hi,
I hope I haven't missed something in the documentation, but I can't find a
statement to return a column value to its default.
If I have the following table:
CREATE TABLE tab (col TEXT DEFAULT "some_default", );
I can insert with defaults using
INSERT INTO tab DEFAULT VALUES
But there
Thanks for the speedy response.
Unfortunately, it's not seemingly possible to do...
UPDATE tab SET col = (SELECT dflt_value FROM (PRAGMA table_info(tab)));
... which certainly does make it a pain. Plus this doesn't work anyway
where dflt_value is not a constant, but an expression (e.g. "curren
> You could write a trigger that sets default value if NULL is inserted
> or set via UPDATE.
That's a great idea - thanks! It won't work in all the places since in some
places 'NULL' is a valid value, but I'm sure I can think of a work-around.
Thank you!!
__
Adam,
> Is there a primary key on the table?
>
> Is it possible to use insert or replace instead of update, and then not
> reference the column you want to set as a default?
An interesting idea. Unfortunately, I think in my case it would be too much
of a performance hit since I would be updatin
Hi,
I have tracked down a bug in some other software where two tables have the same
name, where it seems that the one table was masking the other.
I can demonstrate simply with the following (on v3.6.23.1):
create table t(i);
insert into t values (1);
attach database "other.db" as other;
creat
Hi,
I've spotted a bug in the CREATE TEMP TABLE statement. If you do:
CREATE TEMP TABLE main.table (col);
then the table is made but temporary, in conflict to the qualified name. If
you do the same, but specify an attached database, you receive the error
"temporary table name must be unquali
).
The patch is a mere 20 lines (including comments). I have tested it for
standard tables, but not for virtual tables, etc. If anyone is interested
in the patch, I would be very interested to hear how well it works.
Regards
Andy
- Original Message -
From: "Andy Gibbs&
> I think the bigger issue is that you probably shouldn't rely on
> automatic resolution of names. ... If you're using multiple
> databases-- even just temp and main-- the best solution is to
> just qualify as much as you can.
This is sound advice.
Thank you, also, for the clarification of th
> Since we are at this topic let me ask the question: Are the table names
> case insensitive?
Yes, I believe they are: as are all identifiers.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite
- Original Message -
From: "Alexey Pechnikov"
Newsgroups: gmane.comp.db.sqlite.general
Sent: Saturday, May 08, 2010 2:27 PM
Subject: Re: Returning column to default
Please send to me this patch. I think it may be added to unofficial
http://sqlite.mobigroup.ru repository.
No problems.
> While implementing a table that intended for arbitrary table storage, I
> automatically named some field rowid not linking at the moment that it
> will
> have a name conflict with sqlite internal rowid name. Lately I discovered
> this, and (not a big deal) recreated table with a different name.
> Of course if you define a column "rowid integer primary key" then the
> declared column and the internal rowid are one and the same...
As an extension of this, if you are in the habit of relying on the internal
rowid rather than having your own specifically declared "integer primary
key" *and*
>> [...] does
>>
>> db last_insert_rowid
>>
>> reliably return the_key of the most recently inserted database row,
>> so that the returned value may safely (across vacuums etc) be used
>> as a foreign reference to t's the_key column?
>
> Yes.
Actually there *is* a caveat, which is that if the inse
On Wednesday, June 09, 2010 9:27 PM, Jay A. Kreibich wrote:
> On Wed, Jun 09, 2010 at 03:15:32PM -0400, Sam Carleton scratched on the
> wall:
>> From looking at the compile page (http://www.sqlite.org/compile.html), I
>> am
>> not seeing any compile options to turn on foreign key support. Was it
On Wednesday, June 30, 2010 7:21 PM, D. Richard Hipp wrote:
> We are in the final phases of development for SQLite version 3.7.0.
> The key enhancement over version 3.6.23.1 is support for the use of
> write-ahead logs for transaction control. See
> http://www.sqlite.org/draft/wal.html
> for add
On Monday, May 03, 2010 4:47 PM, D. Richard Hipp wrote:
Subject: Proposed new sqlite3_open_v3() interface
> Community feedback is requested for the following proposed new SQLite
> C API:
>
>int sqlite3_open_v3(const char*, sqlite3**, int, const char*);
>
> The new database connection construct
Miha Vrhovnik wrote on 1/7/2010:> >Content analysis details: (10.3 points,
7.0 required)> >> > pts rule name description> >
-- --> >
2.4 DNS_FROM_OPENWHOIS RBL: Envelope sender listed in bl.open-whois.org
On Thursday, July 01, 2010 9:56 PM, Miha Vrhovnik wrote:
> It's time to get rid of your current e-mail client ...
> ... and start using si.Mail.
>
> It's small & free. ( http://www.simail.si/ )
A nice little advert and out of curiosity I went to the website and had a
little look around. I assum
Hi,
There's a small bug in the memdb.test script, that produces the following
error on v 3.6.23.1 when doing a make fulltest:
memdb-3.3... Ok
memdb-3.4... Ok
memdb-4.0... Ok
./testfixture: couldn't set loop variable: "t1"
while executing
"ifcapable memorydb {
# In the following sequence of
On Tuesday, July 20, 2010 12:37 PM, Robert McVicar wrote:
>I have some code which uses the sqlite3_blob_write() function, but I
> observe some odd behaviour.
> When I pass it a QVector (Qt vector class - similar to std::vector,
> contiguous memory) of a class C (for example) when the vector is of
Hi,
Has anyone else had any problems building sqlite 3.7.0 out of the fossil
repository?
'configure' and 'make' run fine, but 'make test' gives me:
cc1: warnings being treated as errors
src/test_demovfs.c: In function 'demoSync':
src/test_demovfs.c:318: error: implicit declaration of function '
On Thursday, July 22, 2010 6:36 PM, Andy Gibbs wrote:
> The configure command I'm using is:
>
> ./configure
> CFLAGS="-std=c99 -Werror" --enable-threadsafe --enable-debug
> --with-tcl=/usr/lib/tcl8.4
>
Sorry, I should add, I'm running on Debian Linux L
On Thursday, July 22, 2010 8:21 PM, Richard Hipp wrote:
>> > The configure command I'm using is:
>> >
>> > ./configure
>> > CFLAGS="-std=c99 -Werror" --enable-threadsafe --enable-debug
>> --with-tcl=/usr/lib/tcl8.4
>> >
>>
>> Sorry, I should add, I'm running on Debian Linux Lenny, with gcc 4.4.4,
On Thursday, July 22, 2010 6:14 PM, Dan Kennedy wrote:
> On the other hand, if the only client connected to a database
> does not disconnect cleanly (i.e. it crashes, the system crashes,
> or the client exits without calling sqlite3_close()), then it
> leaves the *-wal file in place. In this case
On Friday, July 23, 2010 1:26 PM, Richard Hipp wrote:
> You need TCL 8.5 or (even better) 8.6. TCL 8.4 is not adequate
> to run the newer parts of the test suite.
Again, thank you for your quick response.
Please can I suggest that the configure scripts be updated to reflect this
change in depe
Hi,
I'm afraid I believe I have observed a memory leak when running the full
test suite that is part of sqlite 3.7.0.
I have a log file generated from running the test suite which I can send if
it is of interest to the developers - it is 5Mb compressed so I didn't think
it fair to just post it
On Monday, July 26, 2010 4:44 PM, Richard Hipp wrote:
What do you get when you run:
./testfixture test/permutations.test journaltest test/memsubsys2.test
./testfixture test/permutations.test inmemory_journal
test/memsubsys2.test
Please find the log files attached as journaltest.log an
On Tuesday, July 27, 2010 6:43 PM, Richard Hipp wrote:
>> [ ... ]
>>
>> However, I have also attached journaltest2.log which I think does
>> demonstrate the memory leak. Having trawled through the full log file,
>> it
>> seems that the memory leak is coming from the FTS3 tests, so the
>> journal
On Friday, July 30, 2010 2:40 PM, Igor Tandetnik wrote:
> chris23879 wrote:
>> I'm tring to create a paging function in sqlite. Is it possible to
>> declare
>> and use a variable in sqlite.
>
> No. But since SQLite is embedded in your application, you can use
> variables
> in your host programm
Hi,
It seems that following a vacuum on a wal-enabled database, the journal mode
reverts to delete? Is this meant to happen? I couldn't find this stated as
such in the documentation at www.sqlite.org/wal.html.
$ sqlite3 test.db
SQLite version 3.7.0
Enter ".help" for instructions
Enter SQL sta
On Monday, August 02, 2010 4:25 AM, Nikolaus Rath wrote:
Hi,
Could someone clarify to me how the VACUUM command works if WAL is
enabled?
I would like to compact my database, but I am note sure if I should:
1) Run PRAGMA wal_checkpoint to get all outstanding commits into the
database file an
On Tuesday, August 03, 2010 2:09 PM, Andy Gibbs wrote:
I've attached a patch to this email as a follow-up to this suggestion.
Sorry, I think I forgot to attach the patch file. Hopefully its attached
this time!
Andy
___
sqlite-users mailing
On Tuesday, August 03, 2010 2:15 PM, Simon Slavin wrote:
> You can't attach files to messages to this forum. This is done
> intentionally to stop the posts getting unacceptably long (people
> with problems tend to attach their entire source code).
Cunning! Ok, in that case, if anyone is interes
On Thursday, September 09, 2010 10:56 AM, thomas veymont wrote:
> hello,
>
> I'm trying to use the "CREATE TABLE AS" syntax to create a table and
> insert
> in the same time a default row.
>
> e.g :
>
> sqlite> CREATE TABLE test (x NUMERIC) AS (SELECT 25 AS x);
> Error: near "AS": syntax error
>
Hi,
I've got a table with a primary key and then any number of additional tables
with foreign keys that reference this primary key table with "ON DELETE
RESTRICT" hence stopping the deletion of any row from the primary key table
if there exists any rows in any of the foreign key tables that ref
On Thursday, September 23, 2010 3:36 PM, Simon Slavin wrote:
> On 23 Sep 2010, at 2:13pm, Andy Gibbs wrote:
>
>> I've got a table with a primary key and then any number of additional
>> tables
>> with foreign keys that reference this primary key table with "O
On Friday, September 24, 2010 1:03 PM, Josh Gibbs wrote:
> What's the chance that 2 people with the same surname would have
> the same problem in the same week...
>
> [ ... ]
I can only think its something in the name!
I did actually see your thread moments after creating my own. I'd done a
s
Hi,
I was looking at the diff to threadtest3.c in recent commit at
http://www.sqlite.org/src/fdiff?v1=58df1e3c060f534f&v2=d6d209190c7110f9, and
I think I may have spotted an mistake in the code at the end of the function
"static void dynamic_triggers(int nMs)".
The code here runs as follows:
On Tuesday, November 02, 2010 11:23 AM, Dan Kennedy wrote:
> Fair question. But in this case no. The idea was to have one
> thread modifying the triggers. Then several other reader threads
> using the database with the reader threads using both shared and
> unshared caches.
>
Then that's good.
On Tuesday, November 09, 2010 8:29 AM, Tran Van Hoc wrote:
> Dear all.
>
> I'm using SQLite and many thanks for your supports.
>
> I have problem about SQLite features.
>
> That's I don't know SQLite have stored procedure support?
>
How're your C skills? If you are comfortable with the idea, the
Hi,
I notice a new API function in sqlite 3.7.4, namely sqlite3_stmt_readonly.
But what I wonder is, for what purpose it can be used? On the face of it,
it seems very useful, but then as you read through the description you find
a whole load of statement types that return an "undefined" result
On Thursday, December 09, 2010 4:25 AM, Roger Binns wrote:
> You are indeed correct. It was added and is called by Fossil after using
> an
> authorizer. I did (twice) raise these issues with the team before release
> with no response.
It looks like our calls did not go unheeded: it seems now t
On Thursday, January 06, 2011 9:09 AM, stunner Easwar wrote:
> I need to use local variables similar to sql syntax using DECLARE. My
> project involves lot of places where I need to select values from
> different
> tables and insert it into one table. In most of the cases creation of view
> is al
On Thursday, January 06, 2011 10:21 AM, stunner Easwar wrote:
> Hi Andy,
>
> The idea sounds good but the problem i am getting "SQL error: no such
> function". Need I have to write a custom function set_var or it is already
> part of sqlite3. I tried in sqlite3 version 3.6.22.
Sorry, as I said in
On Thursday, January 06, 2011 11:00 AM, Philip Graham Willoughby wrote:
> [... snip ...]
>
> I would dispense with del_var and instead register commit and
> rollback hooks to clear out declared variables when the transaction
> which declared them ends; this is both more like the behaviour of
> DEC
On Tuesday, January 11, 2011 1:54 AM, Richard Hipp wrote:
> This is, technically, a compatibility break.
But wasn't the original change also a compatibility break? But this time it
may make it into the short-form software history at
http://www.sqlite.org/changes.html?
Having studied the chang
On Tuesday, January 11, 2011 1:35 PM, Jean-Denis Muys wrote:
> Don't encumber SQLite with workarounds and special cases
> to cater to bugs in client software.
Isn't an accurate synopsis of the problem this: that Sqlite has *already*
implemented a workaround in 3.7.0, and that this workaround has
On Wednesday, January 12, 2011 10:08 AM, Philip Graham Willoughby wrote:
> unfortunately 3.7.2 shipped in Ubuntu Maverick and
> 3.6.23.1 shipped in a maintenance update for Fedora
> Core 14. So lots of people already have both behaviours
> in the wild.
Actually, the first alteration happened *aft
On Tuesday, January 11, 2011 1:54 AM, Richard Hipp wrote:
> So the question to you, gentle reader, is should we make this change, and
> break backwards compatibility, albeit in a very obscure way, or should we
> be
> hard-nosed and force hundreds or perhaps thousands of smartphone
> application
On Thursday, January 20, 2011 8:27 PM, Stephen Oberholtzer wrote:
> Here's a quick diff. If people (in particular, DRH) think it's worth
> it, I'll write up the test cases and submit a more formal patch.
Great patch!
I'd be interested in a more formal patch with test cases, if you have the
ti
On Monday, January 24, 2011 11:11 AM, Artur Reilin wrote:
>> Hi,
>>
>> I have put together a simple uuid generation method in sqlite:
>>
>> select '{' || hex( randomblob(4)) || '-' || hex( randomblob(2))
>> || '-' || '4' || substr( hex( randomblob(2)), 2) || '-'
>> || s
On Wednesday, January 26, 2011 5:38 PM, Chris Wolf wrote:
> but if anyone is interested, I checked in my work on GitHub, including
> pre-compiled
> binaries for MacOS and Linux.
>
> http://chriswolf.heroku.com/articles/2011/01/26/adding-stored-procedures-to-sqlite/#extended
>
Yes, very interesti
Hi,
I've been running the latest version of (unreleased) sqlite 3.7.6 from
http://www.sqlite.org/draft/download.html and in particular looking at the
new improved "pragma wal_checkpoint". However, it doesn't seem to be doing
what I hoped it would do. I was expecting that following a pragma
w
Hi,
I've attached a very small patch that eliminates a few "unused variable"
warnings that occur when compiled with various OMIT_* options.
Cheers,
Andy
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/
On Tuesday 02 Aug 2016 22:07:32 Andy wrote:
> Hi,
>
> I've attached a very small patch that eliminates a few "unused variable"
> warnings that occur when compiled with various OMIT_* options.
>
> Cheers,
> Andy
Sorry, this time with inline patch...
Index: src/build.c
===
Hi,
I spotted the compiler version checking changes in commits [810d2932] and
[8d3f485d] and thought I'd drop in with some thoughts.
I am not aware of everything that passes on this mailing list (I am only a
sporadic reader) but I did try to go through and see where this change might
have or
Hi,
I need (and have attempted to add) limited support for foreign key
constraints mapping to virtual tables. It seems this is not possible
currently in sqlite, or at least, it gives me "foreign key mismatch" when I
try.
My use-case is this:
create virtual table vtbl using vtblXYZ;
create
Hi,
A quick question: which is better (in terms of speed of execution):
CREATE TRIGGER x
BEFORE INSERT ON y
WHEN expr
BEGIN
SELECT RAISE(ABORT, 'message');
END;
... or ...
CREATE TRIGGER x
BEFORE INSERT ON y
BEGIN
SELECT RAISE(ABORT, 'message') WHERE expr;
END;
Or are the two, for i
On 4th February 2012 12:51pm, Alexey Pechnikov wrote:
> It's very important but there are some questions about
> http://www.sqlite.org/src/info/72b01a982a
> Some times ago DRH wrote that checksum calculation don't slow down
> SQLite significantly.
> But can be this realized in current SQLite 3.x b
Hi,
The following is a reduced test-case of a problem I have observed:
CREATE TABLE a(tid,pid);
CREATE TABLE b(tid,pname);
CREATE TEMP TABLE pidmap(newpid INTEGER,oldpid INTEGER);
CREATE TEMP TABLE pnamemap(pid INTEGER,pname TEXT COLLATE BINARY);
(Please note that the tables are usually populate
On Tuesday, March 03, 2015 10:50 AM, Dan Kennedy wrote:
> On 03/03/2015 03:57 PM, Andy Gibbs wrote:
>> Hi,
>>
>> The following is a reduced test-case of a problem I have observed:
>>
>> CREATE TABLE a(tid,pid);
>> CREATE TABLE b(tid,pname);
>> CREATE TE
69 matches
Mail list logo