Hello,

On Tue, May 20, 2008 at 10:26 PM, D. Richard Hipp <[EMAIL PROTECTED]> wrote:
> So it is not at all clear to me whether this behavior is a bug or a
> feature.  SQLite is doing what the documentation says it ought to do.
> The question is, should the specification of what SQLite ought to do
> change in order to be less surprising to programmers?  And if so, what
> would that new specification be?

I wouldn't mind having to call another function, or call it at a
different time/location,
but if you do an insert, there needs to be *some* way to get the id it
just used. :-)

Considering triggers: if triggers would have had the side-effect of
changing the insert-id, you could still get
the "original" insert-id inside the trigger (which would be hard to
externalize, but still, you could get your
hands on it. If the insert is done in a place you have no control
over, you're completely out of luck.

As a workaround for now, how is the insert ID generally created
(considering a single-threaded app)?

select max(id) + 1 from table?

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

Reply via email to