From: Carroll K. <me...@ca...> - 2004-06-25 13:30:45
|
Using Postgresql with SQLObject (svn updated a few days ago, shouldn't matter in this case anyway) I created a "writeable" view (using rules). However because the viewname is different than the actual primary key, then my inserts fail File "/usr/local/lib/python2.3/site-packages/sqlobject/postgres/pgconnection.py", line 62, in _queryInsertID c.execute("SELECT NEXTVAL('%s_%s_seq')" % (table, idName)) psycopg.ProgrammingError: ERROR: relation "clients_view_clients_id_seq" does not exist SELECT NEXTVAL('clients_view_clients_id_seq') clients_view is a composite of multiple tables, the actual sequence is in another table "clients", so the sequence is really clients_clients_id_seq. Can we add a simple parameter to allow arbitrary sequence names instead? Or is there some other work around? (I could wrap all of the inserts in another transaction, but for other reasons, I want to avoid doing that). |