Opened 7 years ago

Closed 5 years ago

#10837 closed Cleanup/optimization (fixed)

postgresql missing field type codes in data_types_reverse

Reported by: trbs Owned by: nobody
Component: Database layer (models, ORM) Version: master
Severity: Normal Keywords: bpchar, data_types_reverse, introspection inspectdb
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


I've created a patch to add 'char' field support to data_types_reverse in the PostgreSQL.
As a char(50) is basically the same (CharField) as a varchar(50) for Django.

Also created a second patch which also adds 'int8' to the list as an 'IntegerField'.

This would make inspectdb and other (third-party code?) that uses data_type_reverse a bit more complete for PG.

Attachments (3)

10837-bpchar.diff (454 bytes) - added by trbs 7 years ago.
10837-bpchar-int8.diff (675 bytes) - added by trbs 7 years ago.
10837-3.diff (577 bytes) - added by claudep 5 years ago.
Updated to current trunk

Download all attachments as: .zip

Change History (10)

Changed 7 years ago by trbs

Changed 7 years ago by trbs

comment:1 Changed 7 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 7 years ago by trbs

Alex do you want to apply the patch like it is, Or should we broaden this ticket to make the (reversed) type list as complete as possible ?

comment:3 Changed 5 years ago by SmileyChris

  • Severity set to Normal
  • Type set to Cleanup/optimization

comment:4 Changed 5 years ago by patchhammer

  • Easy pickings unset
  • Patch needs improvement set

10837-bpchar-int8.diff fails to apply cleanly on to trunk

comment:5 Changed 5 years ago by ramiro

  • Keywords inspectdb added
  • UI/UX unset

Changed 5 years ago by claudep

Updated to current trunk

comment:6 Changed 5 years ago by claudep

  • Patch needs improvement unset
  • Version changed from 1.0 to SVN

20/int8 is now present in Django code.

comment:7 Changed 5 years ago by ramiro

  • Resolution set to fixed
  • Status changed from new to closed

In [17511]:

Fixed #10837 -- Added CHAR(X)->CharField to mapping used in Postgres DB introspection.

Thanks trbs for the report and initial patch and to Claude Paroz for
updating it.

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