I'm been trying to get HP Vertica Community Edition working with Django by updating the
django-vertica package. For the most part, it is working. Upon doing a manage.py syncdb, I enabled SQL debugging and get this error message:
ProgrammingError: ('42601', '[42601] ERROR 2444: Cannot insert into or update IDENTITY/AUTO_INCREMENT column "id"\n (2444) (SQLPrepare)')
It looks to me that Vertica does not want Django to be including the primary key in its INSERT call.
What's the best way to fix this? I see a few options:
1) Write a custom SQLInsertCompiler for the Vertica side and override as_sql() to do the right thing.
2) Modify SQLInsertCompiler in django.db.models.compiler to omit primary key fields. I noticed that in django.db.backends, there is a variable "supports_unspecified_pk". This doesn't appear to be used at all.
What's the right way?