Shane, you wrote:
> I could not reproduce this on the current or 3.6.23 build:
> 
> >./sqlite3 -version
> 3.6.23
> 
> >cat script.sql
> CREATE TABLE current(x,y,z);
> INSERT INTO current DEFAULT VALUES ('a', 'b', 30);
> 
> >./sqlite3 -init script.sql
> -- Loading resources from script.sql
> Error: near line 2: near "(": syntax error

try exactly this code (it is even simpler than code I sent previously):

CREATE TABLE current (src varchar, price decimal(10,2) NOT NULL, timestamp TEXT 
DEFAULT (DATETIME('NOW')));
CREATE TRIGGER entry_in_tab_s before insert on current begin insert or ignore 
into tab_s values (new.src, new.dst, 99999); end;
INSERT INTO current DEFAULT VALUES ('a', 30);

I used different compilations (e.g. amalgamation, Debian packages,
static binary downloadable from sqlite web page). One of them is Debian
source package, version 3.6.23:

libtool: compile:  gcc -g -O2 -DSQLITE_OS_UNIX=1 -I. -I./src 
-D_HAVE_SQLITE_CONFIG_H -DNDEBUG -I/usr/include/tcl8.5 -DSQLITE_THREADSAFE=1 
-DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_OMIT_LOAD_EXTENSION=1 
-DSQLITE_TEMP_STORE=1 -c sqlite3.c -o sqlite3.o

(enabling load extension doesn't change the described behaviour)

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to