Hello: I'm using django 1.7 and I've have the following simple model:

from django.db import models


class RegisteredUser(models.Model):
    user_name=models.CharField("Name", max_length=200)
    register_date=models.DateTimeField('Registration Date')

    def __str__(self):
        return self.user_name

class ProblemList(models.Model):
    problem_number=models.CharField("Number", max_length=100)
    problem_statement=models.CharField("Problem", max_length=500)

    def __str__(self):
        return self.problem_number + '\n' + self.problem_statement

I would like to populate the database by using the PostgreSQL specific
command:

COPY solutions_problemlist from 'filename'

where filename is a file with tab delimited data.  The table exists and I
can populate from the django admin app but I keep getting a "value too long
for type character varying(10)" from the PostgreSQL COPY command.

Any ideas, any more information needed?

Thanks, Jon Joseph
josco....@gmail.com

-- 
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+unsubscr...@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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKzsDAKFKqqs8pdr%2BYdq52bhEUWUt7303vjhfNL6BD-50yfWPw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to