Wednesday, June 20, 2018

python inspectdb got "The error was: function unnest(smallint[]) does not exist"

I use Amazon Redshift database and Django 2.0.6.   My redshift database settings is as below:

DATABASES = {

    'default': {

        'NAME': 'my_db_name',

        'ENGINE': 'django.db.backends.postgresql_psycopg2',

        'USER': 'my_username',

        'PASSWORD': 'my_password',

        'HOST': 'my_hostname',

        'PORT': 5439,

    },

}


When I run "python3 manage.py inspectdb", I got below error messages:


# Unable to inspect table 'eld_messages'

# The error was: function unnest(smallint[]) does not exist

HINT:  No function matches the given name and argument types. You may need to add explicit type casts.


--
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/c80569a6-2beb-4cbd-ad71-ed8470c645c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment