[Twisted-Python] serial datatype in t.e.row

Benjamin Bruheim grolgh at online.no
Fri Sep 13 06:08:41 EDT 2002

> One solution may be to manually run a
> 	SELECT nextval('sequencename')
> to get the next value and use that for the insert, but this requires an
> extra step for each insert, and requires that the we know which tables have
> serial columns (suprisingly hard to figure out..) and makes the behavior for
> tables with serial columns and no serial columns very different.

Wouldn't it be sufficient to add a "reload hint", or something? its only 
INSERT that will be affected. A reloadoninsert-hint would be 
database-implementationindependent as well. The difference between 
getting the whole table or just the ID is neglible in most cases; or 
maybe even a question on wheter serials on anything but the dbKeyColumns 
should be allowed to contain serials.
At least on postgresql there can be stuff happening on the server that 
client would never be able to know about. Letting it reload could also 
be passed as an option to every databaseinteractionmethod.
The reloading itself could be done through the deferred, just as glyph 


\\ benjamin

More information about the Twisted-Python mailing list