Opened 7 years ago

Closed 7 years ago

#7748 closed (invalid)

inspectdb on PostgreSQL database missing type for 'real' column

Reported by: bthomas@… Owned by: nobody
Component: django-admin.py inspectdb Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

I have several columns of type 'real' in a legacy database. 'inspectdb' is not detecting their type correctly. psycopg2's introspection.py maps type 701 to FloatField, but these columns appear to be type 700.

Database is PostgreSQL 8.2 on Win32, using current SVN copy of Django, connecting with psycopg2.

Attachments (1)

inspectdb.diff (477 bytes) - added by bthomas@… 7 years ago.
map type 700 to FloatField

Download all attachments as: .zip

Change History (2)

Changed 7 years ago by bthomas@…

map type 700 to FloatField

comment:1 Changed 7 years ago by Bob Thomas <bthomas@…>

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

It seems that the PostgreSQL backend maps FloatField to the "double precision" type, so mapping a "real" (single precision) isn't really correct here.

Note: See TracTickets for help on using tickets.
Back to Top