Martin Kutschker writes:
> Have the systems which use sequences some nameing schemes, which build the
> sequence name from the table name?
>
SQLite and MySQL don't use sequences, so I can speak only of
PostgreSQL (don't know about Oracle, Sybase et al.). If you use the
Serial type in PostgreSQL, a sequence is automatically created with a
predictable name (tablename_colname_seq). However, you can do this
just as well:
CREATE SEQUENCE whatever_seq;
CREATE TABLE tablename (
colname integer DEFAULT nextval('whatever_seq') NOT NULL
A mechanism that relies on a particular naming scheme of sequences
would fail in the second case.
> And perhaps dbi couild handle the problem that Mysql doesn't store the id by
> table or sequence but by connection by automatically calling
> mysql_last_insert_id() on every insert and storing the ids in a dbi
> datastructure per table.
>
I don't see a real problem here. If an application makes sure to store
relevant id values after INSERT commands, you'll get a portable code
without causing dbi to interfere with tables behind the users back.
regards,
Markus
--
Markus Hoenicka
[EMAIL PROTECTED]
(Spam-protected email: replace the quadrupeds with "mhoenicka")
http://www.mhoenicka.de
-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
libdbi-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libdbi-users