I'm been trying to get HP Vertica Community Edition working with Django by
updating the django-vertica
<https://code.google.com/p/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:
DEBUG (0.002) INSERT INTO "django_site" ("id", "domain", "name") VALUES (1,
example.com, example.com); args=[1, 'example.com', 'example.com']
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?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.