On Feb 16, 2006, at 10:32 PM, Robert Leftwich wrote:
3. Inserting entries into a Postgres table in SQLAlchemy *requires* either an OID or a sequence and this sequence *must* be the primary key. This is the case even if only low level SQLAlchemy (i.e. no ORM/data mapping) is being used.
OIDs have nothing to do with anything in SQLAlchemy except that theyre used as the default sort order in a select, if they exist.
sequences are never required by SQLAlchemy, if you have some other way to define primary keys for your rows. if you want to insert a row into a postgres table and you havent already set the primary key in the parameters and theres no other DEFAULT set on the column, then Postgres requires a sequence be used (noting that SERIAL is just a synonym for "theres a sequence named <table>_id_seq"). SQLAlchemy will call the sequence if the primary key column, or another column default, is not defined.
but there could be bugs. what behavior have you observed ? ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ Sqlalchemy-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

