Opened 8 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

Description

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 8 years ago.
10837-bpchar-int8.diff (675 bytes) - added by trbs 8 years ago.
10837-3.diff (577 bytes) - added by Claude Paroz 5 years ago.
Updated to current trunk

Download all attachments as: .zip

Change History (10)

Changed 8 years ago by trbs

Attachment: 10837-bpchar.diff added

Changed 8 years ago by trbs

Attachment: 10837-bpchar-int8.diff added

comment:1 Changed 7 years ago by Alex Gaynor

Triage Stage: UnreviewedAccepted

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 6 years ago by Chris Beaven

Severity: Normal
Type: Cleanup/optimization

comment:4 Changed 6 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 Morales

Keywords: inspectdb added
UI/UX: unset

Changed 5 years ago by Claude Paroz

Attachment: 10837-3.diff added

Updated to current trunk

comment:6 Changed 5 years ago by Claude Paroz

Patch needs improvement: unset
Version: 1.0SVN

20/int8 is now present in Django code.

comment:7 Changed 5 years ago by Ramiro Morales

Resolution: fixed
Status: newclosed

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