On 12 kesä, 18:50, IgorS <igor.shm...@gmail.com> wrote:
> Hi ALL!
>
> It seems that there is no class in Django models that represents 4-byte
> data type "real" in postgres. I looked into
> django\db\backends\postgresql_psycopg2\creation.py but could not find it
> there. The only choice seems to be FloatField, which represents "double
> precision" in postgres. But i would like to use "real" to minimize the
> index size? How can i do it?

It might be you will need to do a FloatField subclass - RealField,
which will return "REAL" as its database type from field.db_type(). It
has been a while since last dealing with custom fields so there might
be something more needed. Django's documentation should contain more
information.

 - Anssi

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to