Sunday, May 8, 2016

How to support to connect GreenPlum with the 'django.db.backends.postgresql_psycopg2' ?

Hello,

I got an error when I tried to utilize the 'django.db.backends.postgresql_psycopg2' to connect Greenplum.Given,The Greenplum is based on PostgreSQL to develop and Djando's backend support to connect PostgreSQL,so I guess it should be support Greenplum to connect.After I modified the database configuration and executed the command like 
 python manage.py syncdb --noinput
I got an error as following: 
$ python manage.py syncdb --noinput
Syncing...
Creating tables ...
Creating table auth_permission
Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 371, in handle
    return self.handle_noargs(**options)
  File "/usr/lib/python2.7/site-packages/south/management/commands/syncdb.py", line 90, in handle_noargs
    syncdb.Command().execute(**options)
  File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 371, in handle
    return self.handle_noargs(**options)
  File "/usr/lib/python2.7/site-packages/django/core/management/commands/syncdb.py", line 102, in handle_noargs
    cursor.execute(statement)
  File "/usr/lib/python2.7/site-packages/django/db/backends/util.py", line 40, in execute
    return self.cursor.execute(sql, params)
  File "/usr/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 52, in execute
    return self.cursor.execute(query, args)
django.db.utils.DatabaseError: Greenplum Database does not allow having both PRIMARY KEY and UNIQUE constraints

I found it didn't work when I removed all UNIQUE constraints statements.So I want to get some proposals what to modify to support greenplum!
Thank you!




--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/20b556db-e1d9-4da4-8116-d8cbd3788ca7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment