Pavel Ivanov wrote:
> Could you explain why this scenario doesn't cause infinite call cycle
> of the trigger by itself? Is there some protection in SQLite which
> breaks such cycles?
SQLite doesn't support recursive triggers: a trigger cannot call itself,
directly or indirectly. SQLite keeps
Oliver Peters wrote:
>
> I want the "normal" user only identify himself by putting his id into
> the field identity and afterwards let the system decide in what field to
> put his id (INSERT = creator, UPDATE = editor). Doing this for every
> record I can show who created it and who was the last
On , Pavel Ivanov wrote:
> Hi, Richard!
>
> Could you explain why this scenario doesn't cause infinite call cycle
> of the trigger by itself? Is there some protection in SQLite which
> breaks such cycles?
>
Many dbms forbid recursive trigger calls that modify a table that
Am Montag, den 22.06.2009, 17:39 -0600 schrieb Dennis Cote:
> Oliver Peters wrote:
> > sorry: my code wasn't completely what I wanted so here again:
> >
> > CREATE TRIGGER IF NOT EXISTS test
> > BEFORE INSERT ON "a"
> > BEGIN
> > INSERT INTO
Oliver Peters wrote:
> sorry: my code wasn't completely what I wanted so here again:
>
> CREATE TRIGGER IF NOT EXISTS test
> BEFORE INSERT ON "a"
> BEGIN
> INSERT INTO a(code,name,creator)
> VALUES(new."code",new."name",new."identity");
>
Hi, Richard!
Could you explain why this scenario doesn't cause infinite call cycle
of the trigger by itself? Is there some protection in SQLite which
breaks such cycles?
Pavel
On Mon, Jun 22, 2009 at 4:10 PM, D. Richard Hipp wrote:
>
> On Jun 22, 2009, at 3:33 PM, Oliver Peters
On Jun 22, 2009, at 3:33 PM, Oliver Peters wrote:
> Hello out there,
>
>
> to my mind I get false entries in sqlite_sequence using this code:
>
>
> CREATE TABLE IF NOT EXISTS a(
> id INTEGER PRIMARY KEY AUTOINCREMENT,
> code
[...]
>
> The ROWID is not generated until the INSERT statement actually runs.
> Hence the BEFORE trigger does not have access to it and the BEFORE
> trigger sees a NULL. Change the trigger to an AFTER trigger and it
> will work.
>
[...]
>
> D. Richard Hipp
> d...@hwaci.com
Thanks for
On Jun 22, 2009, at 3:33 PM, Oliver Peters wrote:
> Hello out there,
>
>
> to my mind I get false entries in sqlite_sequence using this code:
>
>
> CREATE TABLE IF NOT EXISTS a(
> id INTEGER PRIMARY KEY AUTOINCREMENT,
> code
Hello out there,
to my mind I get false entries in sqlite_sequence using this code:
CREATE TABLE IF NOT EXISTS a(
id INTEGER PRIMARY KEY AUTOINCREMENT,
codeVARCHAR NOT NULL,
name
10 matches
Mail list logo