[Fdo_dev] About RDBI's get_gen_id() function
Mateusz Loskot
mateusz at loskot.net
Wed Jan 10 12:15:52 EST 2007
Dan Stoica wrote:
> Hi,
>
> I would agree with option 1), i.e. adding 'column' as input parameter.
> Although is quite unusual having more than one auto-generated columns on
> a table...
Unusual but possible, at least supported by PostgreSQL.
> Unfortunately is going to break all the generic rdbms drivers since they
> implement rdbi_get_gen_id(). Not a big deal, just more work.
OK. So, how should I proceed?
Can I apply appropriate changes or you'd prefer to do it?
> BTW, what happens in PostGis when passing a NULL or an empty column name
> to whatever function gets the auto-generated values?
If NULL column name is passed to postgis_get_gen_id(), then NULL value
is returned as a sequence value.
If empty string is passed as a column name, then PostgreSQL error is
generated:
"ERROR: colun "" of relation <name of table> does not exist
> As for MySql and the logically unsafe issue: FDO does inserts table by
> table and then fetches the auto-generated values right away. In a
> multi-user environment the underlying RDBMS guarantees the isolation.
> Therefore I don't see any risk.
OK
Cheers
--
Mateusz Loskot
http://mateusz.loskot.net
More information about the Fdo_dev
mailing list