Opened 16 years ago

Closed 16 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: dev
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

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@… 16 years ago.
map type 700 to FloatField

Download all attachments as: .zip

Change History (2)

by bthomas@…, 16 years ago

Attachment: inspectdb.diff added

map type 700 to FloatField

comment:1 by Bob Thomas <bthomas@…>, 16 years ago

Resolution: invalid
Status: newclosed

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