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 django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment